document
現在はver7がつい最近リリースされている。
ただ、ver7はドキュメントを見る限り、dockerコマンド単体でなくchectlを別途用意してそこから動かすっぽい(あと、見た感じだとオーケストレーション環境寄りになってるかも)
というわけで、ひとまずver6をお試し。 https://www.eclipse.org/che/docs/che-6/docker-single-user.html
実行するコマンドはこれ
docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v <path>:/data eclipse/che:6.19.0 start
環境
zaki@stilton:~$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS" zaki@stilton:~$ sudo docker version Client: Version: 18.09.7 API version: 1.39 Go version: go1.10.1 Git commit: 2d0083d Built: Fri Aug 16 14:20:06 2019 OS/Arch: linux/amd64 Experimental: false Server: Engine: Version: 18.09.7 API version: 1.39 (minimum version 1.12) Go version: go1.10.1 Git commit: 2d0083d Built: Mon Jul 1 19:31:12 2019 OS/Arch: linux/amd64 Experimental: false zaki@stilton:~$
準備
zaki@stilton:~$ mkdir -p local/che zaki@stilton:~$
pull
zaki@stilton:~$ sudo docker pull eclipse/che:6.19.0 6.19.0: Pulling from eclipse/che d6a5679aa3cf: Pull complete cc87d3e420c3: Pull complete afef80a99ec8: Pull complete d4be2f254bed: Pull complete 3e449e5a7821: Pull complete 5b621c46cfe0: Pull complete 8f6cbdec47a1: Pull complete 3c3ba722c6c9: Pull complete Digest: sha256:ccf3500e7896f4ffb017914a1fcb606f70a9f2c85627bc446bd1106c99424613 Status: Downloaded newer image for eclipse/che:6.19.0 zaki@stilton:~$
run
sudo docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v ~/local/che:/data -p 8000:8080 eclipse/che:6.19.0 start
リモートのVMで動かすので、-pつける。あとtomcatも飼ってたりするので8080でなく8000で。
ホストのdocker.sockを共有するようにして実行するのがちょっと気持ち悪いけどドキュメントがそうなっているのでとりあえずそれで実行。
(ちなみにこれは実行した感じだと、コンテナ内から追加のイメージpullが必要だから、、、だと思われ)
zaki@stilton:~$ sudo docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v ~/local/che:/data -p 8000:8080 eclipse/che:6.19.0 start
WARNING: No swap limit support
INFO: (che cli): Pulling image alpine:3.4
INFO: (che cli): Pulling image eclipse/che-ip:6.19.0
INFO: (che cli): 6.19.0 - using docker 18.09.7 / native
WARN: Newer version 'rc' available
INFO: (che download): Checking for image 'eclipse/che-init:6.19.0'... not found
INFO: (che download): Pulling image eclipse/che-init:6.19.0
6.19.0: Pulling from eclipse/che-init
e110a4a17941: Pull complete
c6be0cda3022: Pull complete
b883875a9222: Pull complete
d7e1053f3043: Pull complete
be7eeaaf0b9d: Pull complete
df35a7b3f7c3: Pull complete
155bcd0853b5: Pull complete
46de6a69ae93: Pull complete
92cadf9b3cd4: Pull complete
Digest: sha256:df6d1b1b5317d529d1a6583dbfc883177d19ef22e4587e6560aea3840f310528
Status: Downloaded newer image for eclipse/che-init:6.19.0
INFO: (che download): Checking for image 'eclipse/che-server:6.19.0'... not found
INFO: (che download): Pulling image eclipse/che-server:6.19.0
6.19.0: Pulling from eclipse/che-server
6c40cc604d8e: Pull complete
e78b80385239: Pull complete
47317d99e629: Pull complete
8c18271a5e4b: Pull complete
7ec778dc4b27: Pull complete
efb7ff1f23b8: Pull complete
658b2052a4e5: Pull complete
bf93d30a3bd4: Pull complete
1760bee015bd: Pull complete
Digest: sha256:7425a578409bfd629325e34eb066149d4cced0a4cff17d2b0039185c8e3986af
Status: Downloaded newer image for eclipse/che-server:6.19.0
INFO: (che download): Checking for image 'docker/compose:1.10.1'... not found
INFO: (che download): Pulling image docker/compose:1.10.1
1.10.1: Pulling from docker/compose
b7f33cc0b48e: Pull complete
6eee752e5396: Pull complete
47fa9819d17a: Pull complete
02a3db631487: Pull complete
938bc1eb66ad: Pull complete
5f279040b7cf: Pull complete
Digest: sha256:6e539fca9f205dc80311260f8cad4397a5d5d0c2ece758792cdbb0ca46432d88
Status: Downloaded newer image for docker/compose:1.10.1
INFO: (che download): Checking for image 'eclipse/che-action:6.19.0'... not found
INFO: (che download): Pulling image eclipse/che-action:6.19.0
6.19.0: Pulling from eclipse/che-action
d6a5679aa3cf: Already exists
03f9c43ecc5e: Pull complete
9ff8e0f873b8: Pull complete
dcabc22d3a99: Pull complete
0270e3305fbb: Pull complete
5cfd313049fc: Pull complete
Digest: sha256:45604191b0e68a0867aa7915dc2b5fe97556eaa274c93c73914fd5ad4f017a37
Status: Downloaded newer image for eclipse/che-action:6.19.0
INFO: (che download): Checking for image 'eclipse/che-dir:6.19.0'... not found
INFO: (che download): Pulling image eclipse/che-dir:6.19.0
6.19.0: Pulling from eclipse/che-dir
d6a5679aa3cf: Already exists
03f9c43ecc5e: Already exists
9ff8e0f873b8: Already exists
dcabc22d3a99: Already exists
0270e3305fbb: Already exists
5cfd313049fc: Already exists
Digest: sha256:281a6728cfbacf066e928a0f3f89617486a128eb65b01e8a76be7528f0938c25
Status: Downloaded newer image for eclipse/che-dir:6.19.0
INFO: (che download): Checking for image 'eclipse/che-test:6.19.0'... not found
INFO: (che download): Pulling image eclipse/che-test:6.19.0
6.19.0: Pulling from eclipse/che-test
d6a5679aa3cf: Already exists
03f9c43ecc5e: Already exists
9ff8e0f873b8: Already exists
dcabc22d3a99: Already exists
0270e3305fbb: Already exists
5cfd313049fc: Already exists
Digest: sha256:21f0f795d59841885dcb8f74e0ab9b012fb06c38ad353cc4f7ac9fdc45415ff6
Status: Downloaded newer image for eclipse/che-test:6.19.0
INFO: (che download): Checking for image 'eclipse/che-mount:6.19.0'... not found
INFO: (che download): Pulling image eclipse/che-mount:6.19.0
6.19.0: Pulling from eclipse/che-mount
d6a5679aa3cf: Already exists
e99e0cb14db3: Pull complete
1200276ba71a: Pull complete
be69453a0591: Pull complete
Digest: sha256:cf471949ca28b0ff1e475647669cea736e794357101328ee74bdc926f5729ff9
Status: Downloaded newer image for eclipse/che-mount:6.19.0
INFO: (che init): Installing configuration and bootstrap variables:
INFO: (che init): CHE_HOST=10.0.2.15
INFO: (che init): CHE_VERSION=6.19.0
INFO: (che init): CHE_CONFIG=/home/zaki/local/che
INFO: (che init): CHE_INSTANCE=/home/zaki/local/che/instance
INFO: (che config): Generating che configuration...
INFO: (che config): Customizing docker-compose for running in a container
INFO: (che start): Preflight checks
WARNING: No swap limit support
mem (1.5 GiB): [OK]
disk (100 MB): [OK]
port 8080 (http): [ALREADY IN USE]
ERROR: Ports required to run che are used by another program.
zaki@stilton:~$
あれ?8080…
zaki@stilton:~$ sudo systemctl stop tomcat8.service zaki@stilton:~$
再実行
zaki@stilton:~$ sudo docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock -v ~/local/che:/data -p 8000:8080 eclipse/che:6.19.0 start
WARNING: No swap limit support
INFO: (che cli): 6.19.0 - using docker 18.09.7 / native
WARN: Newer version 'rc' available
INFO: (che config): Generating che configuration...
INFO: (che config): Customizing docker-compose for running in a container
INFO: (che start): Preflight checks
WARNING: No swap limit support
mem (1.5 GiB): [OK]
disk (100 MB): [OK]
port 8080 (http): [AVAILABLE]
conn (browser => ws): [OK]
conn (server => ws): [OK]
INFO: (che start): Starting containers...
INFO: (che start): Services booting...
INFO: (che start): Server logs at "docker logs -f che"
ここまで来たら、ブラウザでVMにアクセスしてみる。
あれ?-pオプションの使い方間違ってるのかな…?

思ったよりもサクサクうごく。
ちなみに最初試したVMはストレージ不足でmkdirが使えず…
zaki@chaource:~$ mkdir local mkdir: cannot create directory ‘local’: No space left on device zaki@chaource:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 967M 0 967M 0% /dev tmpfs 200M 1008K 199M 1% /run /dev/sda2 20G 19G 0 100% / tmpfs 997M 0 997M 0% /dev/shm :
まじでか、、w