LoginSignup
4
4

More than 5 years have passed since last update.

MacOS XでdockerコマンドがCannot connect になる時の対処法

Posted at

docker-toolboxを使って、docker環境構築している前提。

dockerコマンドを打ったときに、以下の様なCannot connect〜のエラーが発生する。

$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

このエラーが出ている時は、DockerMachineの環境変数がMacに適用されていない時らしいので、

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

を実行してあげると、dockerコマンドが通るようになる。

4
4
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
4
4