简体   繁体   English

docker守护进程未连接

[英]docker daemon not connecting

I am new to docker. 我是Docker的新手。 On Mac OSX I installed docker and docker-machine and ran the following based on what I saw elsewhere online and on stackoverflow. 在Mac OSX上,我安装了docker和docker-machine,并根据我在网上其他地方和在stackoverflow上看到的内容运行了以下命令。 Why is the daemon not connecting? 守护程序为什么没有连接? Do I need to change my config to unix sockets for communications? 我是否需要将配置更改为unix套接字以进行通信? Did I start my docker daemon correctly via docker-machine? 我是否通过docker-machine正确启动了docker守护进程?

docker-machine create --driver virtualbox default
...
Setting Docker configuration on the remote daemon...
Checking connection to Docker...
Docker is up and running!
To see how to connect your Docker Client to the Docker Engine running 
on this virtual machine, run: docker-machine env default
..
docker run debian echo "Hello World"
docker: Cannot connect to the Docker daemon at 
unix:///var/run/docker.sock. Is the docker daemon running?.
See 'docker run --help'.

To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: docker-machine env default 要查看如何将Docker客户端连接到在此虚拟机上运行的Docker引擎,请运行:docker-machine env default

The command you're missing is eval "$(docker-machine env default)" which will update your environment with $DOCKER_HOST and $DOCKER_TLS_VERIFY settings you can use to connect to the daemon. 您缺少的命令是eval "$(docker-machine env default)" ,它将使用可用来连接到守护程序的$DOCKER_HOST$DOCKER_TLS_VERIFY设置来更新您的环境。

One possible reason could be change in your IP address. 一种可能的原因可能是您的IP地址发生了变化。 simply restart the docker (click on the right-top of your screen a docker-whale). 只需重新启动docker(在屏幕的右上角单击docker-whale)即可。 Then again try to run the docker. 然后再次尝试运行docker。 Use Docker desktop app for mac 在Mac上使用Docker桌面应用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM