67
58

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 for Windowsでのエラー

Last updated at Posted at 2017-11-28

Docker for Windowsでのエラー

Docker for Windowsで以下のコマンドを実行すると、エラーが出るようになった。

$ docker ps
error during connect: Get http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.29/containers/json: open //./pipe/docker_engine: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.

docker-machine lsなどもアウト。

$ docker-machine ls
NAME      ACTIVE   DRIVER       STATE     URL   SWARM   DOCKER   ERRORS
default            virtualbox   Timeout

$ docker-machine active
Error getting active host: timeout

$ eval $(docker-machine env default)
Error checking TLS connection: ssh command error:
command : ip addr show
err     : exit status 255
output  :

docker -vなどは動く。

以下のサイトを参考にし、解決。

参考:http://acchi-muite-hoi.hatenablog.com/entry/2016/04/26/223559

1.Dockerマシンの再作成

Dockerマシンdefaultを削除し、再作成する。

$ docker-machine rm default
$ docker-machine create default --driver virtualbox

2.環境変数を設定

$ eval` "$(docker-machine env default)"`

実行したら、以下のようなメッセージが出てきた。

$ eval` "$(docker-machine env default)"`
bash: export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="C:\Users\USERNAME\.docker\machine\machines\default"
export DOCKER_MACHINE_NAME="default"
export COMPOSE_CONVERT_WINDOWS_PATHS="true"
# Run this command to configure your shell:
# eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env default): No such file or directory

最後の行、直接パスを指定?
言われるがまま実行。

$ eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env default)

これでうまくいきました。

67
58
1

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
67
58

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?