我找不到任何由 Docker Beta for Mac
创建的证书文件。我的 IDE 连接到 Docker 时需要它。
最佳答案
I installed the Docker Beta for Mac and found no ~/.docker/ directory.
如“Docker for Mac vs. Docker Toolbox¶”中所述
With Docker for Mac, you get only one VM, and you don’t manage it.
It is managed by the Docker for Mac application, which includes autoupdate to update the client and server versions of Docker.If you need several VMs and want to manage the version of the Docker client or server you are using, you can continue to use
docker-machine
所以您将在 ~/.docker/machine
中看到证书只有当你决定创建自己的。
使用新的 Docker for Mac 设置,检查 /Applications/Docker.app/
中是否有任何证书(如 /Applications/Docker.app/Contents/Resources
)
如果您依赖默认的 HyperKit,则无需证书即可使用 docker 命令联系虚拟机。
如以下评论所示(以及 OP Kroderia 的 answer ),默认 VM 只能通过 /var/run/docker.sock
访问。
如Ellis下面的评论,这对于某些软件来说可能是一个挑战 PyCharm :
when it (PyCharm) tries to connect it produces:
Cannot connect: javax.ws.rs.ProcessingException:
Could not initialize class org.newsclub.net.unix.NativeUnixSocket"
Issue 153973建议:
This is due to that Docker plugin is bundled in PyCharm. It could be updated manually but even with Docker 2.3.1 the problem with Docker Python interpreter will not be fixed.
The next PyCharm 2016.2 EAP with the fix is on its way.The workaround with
socat
you described will be available in the next PyCharm 2016.2 EAP. The next EAP will be released soon with the updated Docker plugin version.
socat TCP-LISTEN:2375,reuseaddr,fork UNIX-CONNECT:/var/run/docker.sock
关于docker - Docker Beta for Mac 的证书文件夹在哪里,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38285282/