Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
51
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

@Y-Kanoh

Docker for Windowsでのエラー

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)

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

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
51
Help us understand the problem. What are the problem?