32
32

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【docker 0.11】boot2dockerをバージョンアップした際のメモ

Last updated at Posted at 2014-05-08

docker0.11がリリースされたので、boot2dockerアップデート・インストールした際のメモ

$ brew install boot2docker
==> Installing boot2docker dependency: docker
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/docker-0.11.0.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring docker-0.11.0.mavericks.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
?  /usr/local/Cellar/docker/0.11.0: 9 files, 13M
==> Installing boot2docker
==> Downloading https://github.com/boot2docker/boot2docker/archive/v0.8.0.tar.gz
######################################################################## 100.0%
?  /usr/local/Cellar/boot2docker/0.8.0: 4 files, 32K, built in 3 seconds
$ boot2docker init
[2014-05-08 13:49:59] Creating VM boot2docker-vm
Virtual machine 'boot2docker-vm' is created and registered.
UUID: 0dc33add-30e8-4030-b35e-3af36e6bf43f
Settings file: '/Users/koudaiii/VirtualBox VMs/boot2docker-vm/boot2docker-vm.vbox'
[2014-05-08 13:49:59] Apply interim patch to VM boot2docker-vm (https://www.virtualbox.org/ticket/12748)
[2014-05-08 13:49:59] Setting VM settings
[2014-05-08 13:49:59] Setting VM networking
[2014-05-08 13:50:00] Setting VM disks
[2014-05-08 13:50:00] Creating 40000 Meg hard drive...
Converting from raw image file="stdin" to file="/Users/koudaiii/.boot2docker/boot2docker-vm.vmdk"...
Creating dynamic image with size 41943040000 bytes (40000MB)...
[2014-05-08 13:50:00] Done.
[2014-05-08 13:50:00] You can now type boot2docker up and wait for the VM to start.
$ boot2docker up
[2014-05-08 14:09:38] Starting boot2docker-vm...
[2014-05-08 14:09:57] Started.

To connect the docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://localhost:4243
$ docker ps
2014/05/08 14:18:17 Error: client and server don't have same version (client : 1.11, server: 1.10)

ありゃ、どうやらbrew update や brew upgrade ではserverのバージョンが上がらない。

なので、
Docker VMのイメージをダウンロードするboot2docker downloadコマンドでためす。
既存のDocker VMと置き換えるために、前後でboot2docker deleteとboot2docker initを実行

$ boot2docker stop
[2014-05-08 14:39:21] Shutting down boot2docker-vm...

$ boot2docker delete
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

$ boot2docker download
[2014-05-08 14:39:41] Latest version is v0.8.1, downloading...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   342  100   342    0     0    348      0 --:--:-- --:--:-- --:--:--   348
100 24.0M  100 24.0M    0     0  1132k      0  0:00:21  0:00:21 --:--:-- 1068k
[2014-05-08 14:40:03] Done

$ boot2docker init
[2014-05-08 14:40:13] Creating VM boot2docker-vm
Virtual machine 'boot2docker-vm' is created and registered.
UUID: c95e1c52-4b8e-4771-b359-f0027e66c666
Settings file: '/Users/koudaiii/VirtualBox VMs/boot2docker-vm/boot2docker-vm.vbox'
[2014-05-08 14:40:14] Apply interim patch to VM boot2docker-vm (https://www.virtualbox.org/ticket/12748)
[2014-05-08 14:40:14] Setting VM settings
[2014-05-08 14:40:14] Setting VM networking
[2014-05-08 14:40:14] Setting VM disks
[2014-05-08 14:40:14] Creating 40000 Meg hard drive...
Converting from raw image file="stdin" to file="/Users/koudaiii/.boot2docker/boot2docker-vm.vmdk"...
Creating dynamic image with size 41943040000 bytes (40000MB)...
[2014-05-08 14:40:14] Done.
[2014-05-08 14:40:14] You can now type boot2docker up and wait for the VM to start.

$ boot2docker up
[2014-05-08 14:40:51] Starting boot2docker-vm...
[2014-05-08 14:41:10] Started.

To connect the docker client to the Docker daemon, please set:
export DOCKER_HOST=tcp://localhost:4243

$ docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES

$ docker version
Client version: 0.11.0
Client API version: 1.11
Go version (client): go1.2.1
Git commit (client): 15209c3
Server version: 0.11.0
Server API version: 1.11
Git commit (server): 15209c3
Go version (server): go1.2.1
Last stable version: 0.11.1, please update docker

コマンドも通り無事アップグレード成功

memo追加

前の記述だとinstallからやっているため、既に入っている状態の時のメモを追加

すべてのdocker、boot2docker停止後

$ brew update
$ brew upgrade boot2docker
Error: boot2docker-0.8.0 already installed

$ boot2docker download
[2014-05-09 00:11:29] Latest version is v0.8.1, downloading...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   342  100   342    0     0    302      0  0:00:01  0:00:01 --:--:--   302
100 24.0M  100 24.0M    0     0  1112k      0  0:00:22  0:00:22 --:--:-- 1724k
[2014-05-09 00:11:51] Done

$ brew upgrade docker
==> Upgrading 1 outdated package, with result:
docker 0.11.0
==> Upgrading docker
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/docker-0.11.0.mavericks.bottle.tar.gz
######################################################################## 100.0%
==> Pouring docker-0.11.0.mavericks.bottle.tar.gz
==> Caveats
Bash completion has been installed to:
  /usr/local/etc/bash_completion.d

zsh completion has been installed to:
  /usr/local/share/zsh/site-functions
==> Summary
?  /usr/local/Cellar/docker/0.11.0: 9 files, 13M

$ boot2docker up
[2014-05-09 00:12:17] Starting boot2docker-vm...
[2014-05-09 00:12:50] Started.


$ docker version
Client version: 0.11.0
Client API version: 1.11
Go version (client): go1.2.1
Git commit (client): 15209c3
Server version: 0.11.0
Server API version: 1.11
Git commit (server): 15209c3
Go version (server): go1.2.1
Last stable version: 0.11.1, please update docker

$ cat /var/lib/boot2docker/bootlocal.sh 
⇒特に消えていない

⇒/var/lib/boot2docker/配下は以前のまま残ってました。またホストオンリーアダブターもそのままのようです。

32
32
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
32
32

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?