Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Docker从Nexus代理拉取错误来自守护进程的响应:未知:未知_Docker_Amazon Ec2_Amazon Elb_Docker Registry_Nexus3 - Fatal编程技术网

Docker从Nexus代理拉取错误来自守护进程的响应:未知:未知

Docker从Nexus代理拉取错误来自守护进程的响应:未知:未知,docker,amazon-ec2,amazon-elb,docker-registry,nexus3,Docker,Amazon Ec2,Amazon Elb,Docker Registry,Nexus3,如下所述配置Nexus docker注册表和代理“dockerhub代理”后: 我可以在docker登录后将图像推送到nexus注册表,但无法通过nexus代理“dockerhub代理”从docker hub中提取图像,错误没有给出详细信息: 来自守护进程的错误响应:未知:未知 这适用于在docker桌面窗口上运行的docker守护程序客户端: 版本2.0.0.3(31259) 频道:稳定 内部版本:8858db3 发动机:18.09.2 我已经通过docker客户端从Linux EC2

如下所述配置Nexus docker注册表和代理“dockerhub代理”后:

我可以在docker登录后将图像推送到nexus注册表,但无法通过nexus代理“dockerhub代理”从docker hub中提取图像,错误没有给出详细信息:

来自守护进程的错误响应:未知:未知

这适用于在docker桌面窗口上运行的docker守护程序客户端:

版本2.0.0.3(31259) 频道:稳定 内部版本:8858db3 发动机:18.09.2

我已经通过docker客户端从Linux EC2实例进行了尝试,效果很好:

[root@ip-主机守护程序docker]#docker pull ip_nexus_主机:端口_http_连接器_nexus_代理/mongo
使用默认标记:最新
最新消息:从mongo撤军
摘要:sha256:29d7ca01f9b7e3812a831ff143620e93ddf5e34bb9ac672d91140e064158a0fc
状态:已下载ip\u nexus\u主机的较新映像:端口\u http\u连接器\u nexus\u代理/mongo:最新

我不知道为什么在windows上它不工作

PS C:\Dev\workspace>docker推送我的域名/nexus/repository/dockerhub代理/映像名:1.0.1
推送引用存储库[my_dns/nexus/repository/dockerhub proxy/image name]
0bca66726bc2:已按下
1.0.1:摘要:sha256:0736228548d13e8d39fba5a0ed5cd8a7719074318fe9f8ddfc395fd454afc01f尺寸:528
PS C:\Dev\workspace>docker pull my_dns/nexus/repository/dockerhub proxy/mysql:latest
**来自守护进程的错误响应:未知:未知**

我正在寻找通过Docker Windows客户端守护程序从Docker Hub(如mongo)提取正式Docker映像的能力,例如通过Nexus OSS上配置的Nexus代理,并通过http连接器公开到Nexus组(包含主机和代理),Nexus OSS托管在AWS EC2 linux实例VPC/专用子网上,没有任何公共主机名/EIP,但通过ELB/ALB


感谢您的帮助

根据本文:

您的nexus通过以下语法公开可用于docker CLI的HTTP(S)连接器:

docker pull <nexus-hostname>:<port_nexus_docker_group>/<dockerHubImage>:<officialTag>
docker push <nexus-hostname>:<port_nexus_docker_host>/<yourImage>:<yourTag>
docker pull:/:
docker推送:/:
如果您的Nexus在VPC中有公共DNS,很明显,只需打开托管和运行Nexus服务器的EC2实例的安全组上的每个端口,即可允许来自IP范围/CIDR源的入站网络流量

如果您的Nexus在VPC的私有子网中有私有IP,只需在公共子网的同一VPC上的前面放置一个AWS-ELB网络负载平衡器,每个暴露的HTTP(S)端口(Nexus组和Nexus托管)有两个TCP侦听器,该侦听器在托管Nexus服务器的EC2实例ID上具有实例目标类型的两个TCP目标组上重定向,这将把网络流量从公共DNS重定向到ELB,然后再重定向到Nexus EC2实例

请注意,我们没有使用AWS-ELB应用程序负载平衡器,因为它仅适用于HTTP侦听器,并且Docker不支持在启动Docker CLI时使用上下文来指定存储库的路径,默认情况下,它是HTTP,并且所有这些应用程序都有URL path模式/v2/*的中间调用

在正确设置和配置后,您将能够docker登录,将图像拉入并推送到内部nexus存储库,如下面的示例powershell会话:

Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

PS D:\> docker login <host_redirect_to_NLB>:<port_nexus_docker_group>
Username: tarik
Password:
Login Succeeded
PS D:\> docker login <host_redirect_to_NLB>:<port_nexus_docker_host>
Username: tarik
Password:
Login Succeeded
PS D:\> docker pull <host_redirect_to_NLB>:<port_nexus_docker_group>/amazonlinux
Using default tag: latest
latest: Pulling from amazonlinux
72d97abdfae3: Pull complete
Digest: sha256:04f5ea9fec3f1f514451ea7c1a1a77a7c023787cb6cc066cc6d0413b56cd0eac
Status: Downloaded newer image for <host_redirect_to_NLB>:<port_nexus_docker_group>/amazonlinux:latest
PS D:\> docker tag <host_redirect_to_NLB>:<port_nexus_docker_group>/amazonlinux <host_redirect_to_NLB>:<port_nexus_docker_host>/tarik-awslinux:1.0
PS D:\> docker push <host_redirect_to_NLB>:<port_nexus_docker_host>/tarik-awslinux:1.0
The push refers to repository [<host_redirect_to_NLB>:<port_nexus_docker_host>/tarik-awslinux]
f387c8b346c8: Pushed
1.0: digest: sha256:04f5ea9fec3f1f514451ea7c1a1a77a7c023787cb6cc066cc6d0413b56cd0eac size: 529
PS D:\> more C:\Users\Tarik\.docker\config.json
{
        "auths": {
                "<host_redirect_to_NLB>:<port_nexus_docker_host>": {},
                "<host_redirect_to_NLB>:<port_nexus_docker_group>": {}
        },
        "HttpHeaders": {
                "User-Agent": "Docker-Client/18.09.2 (windows)"
        },
        "credsStore": "wincred",
        "stackOrchestrator": "swarm"
}

PS D:\> more C:\Users\Tarik\.docker\daemon.json
{
  "registry-mirrors": [
    "https://<host_redirect_to_NLB>:<port_nexus_docker_group>"
  ],
  "insecure-registries": [
    "<host_redirect_to_NLB>:<port_nexus_docker_host>",
    "<host_redirect_to_NLB>:<port_nexus_docker_group>"
  ],
  "disable-legacy-registry": true,
  "debug": true,
  "experimental": false
}
Windows PowerShell
版权所有(C)微软公司。版权所有。
PS D:\>docker登录:
用户名:tarik
密码:
登录成功
PS D:\>docker登录:
用户名:tarik
密码:
登录成功
PS D:\>docker pull:/amazonlinux
使用默认标记:最新
最新:从amazonlinux推出
72d97abdfae3:拉动完成
摘要:sha256:04f5ea9fec3f1f514451ea7c1a1a77a7c023787cb6cc066cc6d0413b56cd0eac
状态:下载的更新图像:/amazonlinux:latest
PS D:\>docker标签:/amazonlinux:/tarik awslinux:1.0
PS D:\>码头推送:/tarik awslinux:1.0
推送引用存储库[:/tarik awslinux]
f387c8b346c8:按下
1.0:摘要:sha256:04f5ea9fec3f1f514451ea7c1a1a77a7c023787cb6cc066cc6d0413b56cd0eac大小:529
PS D:\>更多C:\Users\Tarik\.docker\config.json
{
“授权”:{
":": {},
":": {}
},
“HttpHeaders”:{
“用户代理”:“Docker客户端/18.09.2(windows)”
},
“credsStore”:“wincred”,
“stackOrchestrator”:“swarm”
}
PS D:\>更多C:\Users\Tarik\.docker\daemon.json
{
“注册表镜像”:[
“https://:”
],
“不安全的登记处”:[
":",
":"
],
“禁用旧版注册表”:true,
“调试”:正确,
“实验性”:错误
}