LoginSignup
44
43

More than 5 years have passed since last update.

Mac でのDocker docker-machineのトラブルまとめ

Last updated at Posted at 2015-08-28

環境

2015年8月28日時点

  • Mac OS X: 10.10.5
  • Docker: 1.8.1
  • VirtualBox: 5.0.3

トラブル1: インストールがうまくいかない

VirtualBox 5.0.0-5.0.2辺りの不具合で起きるインストールがうまくいかない問題

トラブル2: default is not running.

以下のメッセージが出る。VMが動作してない。

default is not running. Please start this with docker-machine start default

対策: VMをスタートさせる

docker-machine start default

トラブル3: re-run the docker-machine env command.

メッセージ内容

Started machines may have new IP addresses. You may need to re-run the docker-machine env command.

対策

eval $(docker-machine env default)

トラブル4: An error occurred trying to connect

メッセージ内容

$ docker run -it ubuntu bash
An error occurred trying to connect: Post https://192.168.99.101:2376/v1.20/containers/create: dial tcp 192.168.99.101:2376: i/o timeout

多分、VMが開始されてないか、環境設定されてないか。

参考: problem with docker - Ask Ubuntu

うまくいくと以下のように表示される

$ docker run -it ubuntu:14.04 /bin/bash
Unable to find image 'ubuntu:14.04' locally
14.04: Pulling from library/ubuntu
d3a1f33e8a5a: Pull complete
c22013c84729: Pull complete
d74508fb6632: Pull complete
91e54dfb1179: Already exists
library/ubuntu:14.04: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:7a846cdca616c384ac1c5e3a91d0ea22c89

トラブル5: config.json: no such file or directory

メッセージ

$ docker-machine status
unable to load host: open /Users/user/.docker/machine/machines/config.json: no such file or directory

対策: VM名を指定する

$ docker-machine status default

参考

44
43
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
44
43