eval “$(docker-machine env default)” leads to Erro

2019-05-25 00:03发布

I've installed Docker on my Mac about a month ago, and I now wanted to use it again. The command eval "$(docker-machine env default)" used to work perfectly before, but I now get an error:

Error checking TLS connection: default is not running. Please start it in order to use the connection settings

I searched around for this error, but I can't really find anything about it. Does anybody know what I should do to solve this? All tips are welcome!

1条回答
爱情/是我丢掉的垃圾
2楼-- · 2019-05-25 00:19

Your boot2docker virtual machine must be running inside Virtualbox.

List your Docker machines:

$ docker-machine ls

NAME          ACTIVE   DRIVER       STATE     URL                          SWARM   DOCKER    ERRORS
default       -        virtualbox   Stopped                                        Unknown

Start default machine:

$ docker-machine start default

Starting "default"...
(default) Check network to re-create if needed...
(default) Waiting for an IP...
Machine "default" was started.
Waiting for SSH to be available...
Detecting the provisioner...
Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.

To recreate your default machine:

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

Then you should be able to setup your env with eval "$(docker-machine env default)".

查看更多
登录 后发表回答