gpt4 book ai didi

windows - Windows 上的 docker 工具箱,然后 docker run hello-world 获取 x509 : certificate signed by unknown authority

转载 作者:行者123 更新时间:2023-12-02 19:10:07 26 4
gpt4 key购买 nike

尝试了许多示例,但没有一个对我有用。

我的 Docker 版本:

C:\>docker version
Client:
Version: 1.12.2
API version: 1.24
Go version: go1.6.3
Git commit: bb80604
Built: Tue Oct 11 17:00:50 2016
OS/Arch: windows/amd64
Server:
Version: 1.12.3
API version: 1.24
Go version: go1.6.3
Git commit: 6b644ec
Built: Wed Oct 26 23:26:11 2016
OS/Arch: linux/amd64

我确实将证书 (*.pem) 复制到/etc/docker/certs.d 位置,但没有效果。
docker@default:~$ l /etc/docker/certs.d/
total 24
drwxr-xr-x 2 root root 4096 Nov 30 17:59 ./
drwxr-xr-x 3 root root 4096 Nov 30 17:16 ../
-rwxr-xr-x 1 root root 1679 Nov 30 17:59 ca-key.pem
-rwxr-xr-x 1 root root 1038 Nov 30 17:59 ca.pem
-rwxr-xr-x 1 root root 1078 Nov 30 17:59 cert.pem
-rwxr-xr-x 1 root root 1675 Nov 30 17:59 key.pem

证书是创建 vm 时生成的证书。

感谢您对此的帮助。花了一天时间尝试如何解决这个问题。

运行 docker run hello-world 时生成消息
日志来自位于/var/lib/boot2docker/的 docker.log
time="2016-11-30T18:25:14.233037149Z" level=debug msg="Client and server don't have the same version (client: 1.12.2, server: 1.12.3 )"
time="2016-11-30T18:25:14.233712555Z" level=error msg="Handler for POST /v1.24/containers/create returned error: No such image: hello-world:latest"
time="2016-11-30T18:25:14.244589790Z" level=debug msg="Calling GET /v1.24/info"
time="2016-11-30T18:25:14.244626594Z" level=debug msg="Client and server don't have the same version (client: 1.12.2, server: 1.12.3)"
time="2016-11-30T18:25:14.249913910Z" level=debug msg="Calling POST /v1.24/images/create?fromImage=hello-world&tag=latest"
time="2016-11-30T18:25:14.249943955Z" level=debug msg="Client and server don't have the same version (client: 1.12.2, server: 1.12.3)"
time="2016-11-30T18:25:14.250041478Z" level=debug msg="Trying to pull hello-world from https://registry-1.docker.io v2"
time="2016-11-30T18:25:14.327535482Z" level=warning msg="Error getting v2 registry: Get https://registry-1.docker.io/v2/: x509: certificate signed by unknown authority"
time="2016-11-30T18:25:14.327561850Z" level=error msg="Attempting next endpoint for pull after error: Get https://registry-1.docker.io/v2/: x509: certificate signed by unknown authority"
time="2016-11-30T18:25:14.327574917Z" level=debug msg="Trying to pull hello-world from https://index.docker.io v1"
time="2016-11-30T18:25:14.327587833Z" level=debug msg="hostDir: /etc/docker/certs.d/docker.io"
time="2016-11-30T18:25:14.327858818Z" level=debug msg="[registry] Calling GET https://index.docker.io/v1/repositories/library/hello-world/images"
time="2016-11-30T18:25:14.501831878Z" level=error msg="Not continuing with pull after error: Error while pulling image: Get https://index.docker.io/v1/repositories/library/hello-world/images: x509: certificate signed by unknown authority"

最佳答案

你可能在代理后面。试试这个
须藤 vi/var/lib/boot2docker/profile

在配置文件的末尾添加以下内容

# replace with your office's proxy environment
export "HTTP_PROXY=http://PROXY:PORT"
export "HTTPS_PROXY=http://PROXY:PORT"
# you can add more no_proxy with your environment.
export "NO_PROXY=192.168.99.*,*.local,169.254/16,*.example.com,192.168.59.*"

然后重启boot2docker

上述步骤对我有用。我在 window 上。

关于windows - Windows 上的 docker 工具箱,然后 docker run hello-world 获取 x509 : certificate signed by unknown authority,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40895991/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com