未使用Docker注册表镜像

特里斯坦

当我尝试从本地镜像中提取图像时,它可以工作:

$ docker login -u docker -p mypassword nexus3.pleiade.mycomp.fr:5000
$ docker pull nexus3.pleiade.mycomp.fr:5000/hello-world
Using default tag: latest
latest: Pulling from **hello-world**
78445dd45222: Pull complete 
Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7
Status: Downloaded newer image for **nexus3.pleiade.mycomp.fr:5000/hello-world:latest**

但是,当我想将此注册表用作镜像时,它只会被忽略,图像总是从Web Docker集线器中拉出,而不是从本地镜像中拉出:

$ ps -ef | grep docker
/usr/bin/dockerd -H fd:// --storage-driver=overlay2 --registry-mirror=https://nexus3.pleiade.mycomp.fr:5000

$ docker info
Registry Mirrors:
 https://nexus3.pleiade.mycomp.fr:5000/

$ docker rmi nexus3.pleiade.mycomp.fr:5000/hello-world

_

$ docker pull hello-world
Using default tag: latest
latest: Pulling from **library/hello-world**
78445dd45222: Pull complete 
Digest: sha256:c5515758d4c5e1e838e9cd307f6c6a0d620b5e07e6f927b07d05f6d12a1ac8d7
Status: Downloaded newer image for **hello-world:latest**

我肯定知道它不会使用我的镜像,因为当我取消设置代理设置时,它无法访问hello-world映像。

是Docker错误,还是我缺少某些东西?

Docker信息(简短):

Server Version: 1.13.1
Storage Driver: overlay2
(...)
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.8.0-37-generic
Operating System: Ubuntu 16.10
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 15.67 GiB
(...)
Registry Mirrors:
 https://nexus3.pleiade.edf.fr:5000/

更新

在执行“ journalctl -xe”时,我可以看到一些有用的信息:

level=error msg="Attempting next endpoint for pull after error: Get https://nexus3.pleiade.mycomp.fr:5000/v2/library/hello-world/manifests/latest: no basic auth credentials"

它看起来与https://github.com/docker/docker/issues/20097有关,但是解决方法不起作用:当我替换--registry-mirror = https://nexus3.pleiade.mycomp.fr:5000时通过--registry-mirror = https:// docker [email protected]:5000

我得到完全相同的错误。

如果有关系,则联系使用正在复制到/etc/docker/certs.d/nexus3.pleiade.mycomp.fr:5000/ca.crt的自签名证书,并且可以通过“ docker login”登录。

特里斯坦

这是一个Docker错误:https : //github.com/docker/docker/issues/30880

解决方法是设置一个https反向代理,设置一个硬编码的身份验证标头。

这是Felipe C.的示例配置

在nginx docker配置中,添加:

proxy_set_header Authorization "Basic a2luZzppc25ha2Vk";

完整示例:

server {
    listen *:443 ssl http2;
    server_name docker.domain.blah.net;
    ssl on;
    include ssl/domain.blah.net.conf;
    # allow large uploads of files - refer to nginx documentation
    client_max_body_size 0;
    chunked_transfer_encoding on;
    location / {
        proxy_pass http://127.0.0.1:8083/;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Authorization "Basic YWRtaW46YWRtaW4xMjM=";

        #proxy_set_header X-Forwarded-Proto "https";
    }
}

server {
    listen *:80;
    server_name docker.domain.blah.net;
    return 301 https://$server_name$request_uri;
}

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

使用 docker-compose 构建 docker 镜像并推送到镜像/容器注册表?

如何在 docker-machine 中使用安全的 docker 注册表镜像?

使用Docker私有注册表的Kubernetes中没有ssl的Docker拉镜像

Docker使用Spring和mysql镜像撰写推送到注册表

使用私有端点将 docker 镜像推送到容器注册表

构建 docker 镜像而不将机密暴露给注册表

如何在minikube注册表中创建docker镜像

带有镜像的Docker私有注册表

Docker 私有注册表镜像上传

如何使用 Cloudbuild 在具有不同标签的容器注册表中使用配置文件存储 docker 镜像?

从Openshift的内部Docker注册表中删除未使用的Docker映像?

使用fabric8 java客户端将docker镜像推送到远程注册表

dind:注册表镜像被忽略

是否有 VSTS 构建任务从注册表中删除未使用的 Docker 容器?

Docker镜像未从dockerhub.com注册表获取最新信息

通过 Azure devops 将 docker 镜像复制到 heroko 注册表

无法从 Docker 代理/镜像/缓存注册表中删除图像

禁止隧道或 SSL - 从私有注册表中提取 docker 镜像

如何在Windows中为Docker工具箱设置注册表镜像

从私有dockerhub注册表中提取docker镜像时,Kubernetes中出现ImagePullBackOff错误

docker 镜像在主机上构建时存储在哪里。它在注册表中吗?

如何将多架构 docker 镜像复制到不同的容器注册表?

使用https访问Docker私有注册表

Openshift - 使用服务帐户登录到 docker 注册表

使用Letsencrypt证书设置Docker注册表

Istio 安装失败,使用私有 docker 注册表

使用Docker API推送到私有注册表

使用IP从本地Docker注册表中提取图像

注册表通配符使用