docker - Docker Beta for Mac 的证书文件夹在哪里

标签 docker

我找不到任何由 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 Kroderiaanswer ),默认 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/

相关文章:

docker - Docker批量投资主机到机器

mysql - 无法从另一个容器访问Docker容器中的MySQL数据库

docker - 找不到Dockerfile。请确保在项目文件旁边有一个名为 'Dockerfile'的Dockerfile

docker - Hadoop用docker运行 "hdfs dfs -put"错误

docker - 使用Nginx作为使用Docker的Jenkins代理

docker - 如何在Docker镜像的构建过程中创建Docker参数

django - 在 AWS 上托管 Dockerized Django 项目

linux - 将 `docker ps` 与主机的 `ps` 相关联

node.js - TypeORM 迁移 :run not working errno: -3008, getaddrinfo ENOTFOUND

docker - 如何使用 Docker 的 COPY/ADD 指令将单个文件复制到镜像