简体   繁体   中英

docker daemon not connecting

I am new to docker. On Mac OSX I installed docker and docker-machine and ran the following based on what I saw elsewhere online and on stackoverflow. Why is the daemon not connecting? Do I need to change my config to unix sockets for communications? Did I start my docker daemon correctly via docker-machine?

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

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.

One possible reason could be change in your IP address. simply restart the docker (click on the right-top of your screen a docker-whale). Then again try to run the docker. Use Docker desktop app for mac

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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