Help us understand the problem. What is going on with this article?

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

More than 3 years have passed since last update.

環境

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

参考

hshimo
ブロックチェーン専門企業、コンセンサス・ベイス代表、志茂 博の技術メモ。 興味ある方は、日本ブロックチェーンユーザ会へ。http://crypto-tech.jp/
http://www.consensus-base.com/
consensus-base
ブロックチェーン技術の専門企業。大企業様を中心に国内有数の実証実験・開発の実績があり、様々な実装の経験・ノウハウがある。
http://www.consensus-base.com
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした