Docker TLS error on Mac

2020-05-21 05:42发布

I ran docker images and got the following error:

FATA[0000] Get http:///var/run/docker.sock/v1.17/images/json:
dial unix /var/run/docker.sock: no such file or directory.
Are you trying to connect to a TLS-enabled daemon without TLS?

There seems to be no useful message on how to fix the error. What could be wrong?

标签: docker
3条回答
够拽才男人
2楼-- · 2020-05-21 06:16

https://docs.docker.com/installation/mac/

you need to do this once:

boot2docker init

then, everytime you reboot your mac you will need to run :

boot2docker start

That is the command that starts the docker daemon. But, on each shell you want to access it from you will need to run:

$(boot2docker shellinit)

Now you can use the docker client, like:

docker run hello-world
查看更多
smile是对你的礼貌
3楼-- · 2020-05-21 06:29

Your docker daemon is simply not running.

Just run service docker start

查看更多
萌系小妹纸
4楼-- · 2020-05-21 06:29

It may be not a bug. I am facing the same log when run :"boot2docker up -v" command. Then 'eval "$(boot2docker shellinit)" ' just doesn't work on fish but the "boot2docker shellinit" is actually the fish command. Then I switch to zsh, there is some wired output which also has been reported somewhere. Then I switch to bash. I try both 'eval "$(boot2docker shellinit)" ' and "$(boot2docker shellinit)" without eval. Then I found that "boot2docker shellinit" also generates the fish script. Which may give me the answer why it doesn't work at first place. So I copied the three line of fish script and pasted it in the fish shell and now the error log the one you are facing is going even in the bash. I don't really know the reason. Usually the ev on works on the current shell and current session.

查看更多
登录 后发表回答