どうやら、dockerのバージョンが17になったらしくそれに伴い、docker-toolboxも17が出たみたい。
17は色々変わった関係でdocker-machineのVMも入れ直した。
インストールする
https://github.com/docker/toolbox/releases
からDLして入れる。virtualboxも入れ直したほうが良さそうなので、インストール時にはチェックを入れた。
いま起動しているdocker-machine VMを消す
$ docker-machine stop default
$ docker-machine rm default
これでdefaultのVMが消える。
docker-machine VMを新しく作る
$ docker-machine create default
怒られた。どうやらネットワークの設定がvirtualboxに残っているからエラーになる。
再起動することに。
再起動しても上手く行かなかったので、一度VirtualBoxのアンインストールし、現時点で最新だった5.1.16を入れました。
docker-machine create default
Running pre-create checks...
Creating machine...
(default) Copying C:\Users\username\.docker\machine\cache\boot2docker.iso to C:\Users\username\.docker\machine\machines\default\boot2docker.iso...
(default) Creating VirtualBox VM...
(default) Creating SSH key...
(default) Starting the VM...
(default) Check network to re-create if needed...
(default) Windows might ask for the permission to create a network adapter. Sometimes, such confirmation window is minimized in the taskbar.
(default) Found a new host-only adapter: "VirtualBox Host-Only Ethernet Adapter #2"
(default) Windows might ask for the permission to configure a network adapter. Sometimes, such confirmation window is minimized in the taskbar.
(default) Waiting for an IP...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with boot2docker...
Copying certs to the local machine directory...
Copying certs to the remote machine...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env default
どうやらうまくいきました。
docker-composeが動くか確認
$ @FOR /f "tokens=*" %i IN ('docker-machine env') DO @%i
$ docker-compose up -d
やってみると、docker-compose.ymlの書き方によってはエラーになるみたいです。
特にマウントで失敗します。マウント先がうまくいかないみたいです。
対象の問題はこのissueが建てられています。
https://github.com/docker/compose/issues/4039
再挑戦する
「docker toolbox 再インストール」でぐぐったら以下のサイトが出てきたので以下のサイトにある程度従うことにした。
geekで消して、.virtualbox
フォルダや.docker
フォルダも削除した。system32/driverのほうも削除した。
ただレジストリまでは消さなかった。
そして再起動して、再インストールしたら上手くいった。インストール編はNDIS5のチェックボックス以外は通常インストールした。細々したことはやってない。
どうやらdocker toolboxのアップデートは大変みたい。