我有一个 Dockerfile
将被实施 FROM
一个私有注册表的镜像。 I build this file without any problem with Docker version 1.12.6, build 78d1802
and docker-compose version 1.8.0, build unknown
, but in another machine which has Docker version 17.06.1-ce, build 874a737
and docker-compose version 1.16.1, build 6d1ac21
, the docker-compose build
返回:
FROM my.private.gitlab.registry:port/image:tag
http://my.private.gitlab.registry:port/v2/docker/image/manifests/tag: denied: access forbidden
docker pull my.private.gitlab.registry:port/image:tag
返回相同。
请注意,我试图获取 my.private.registry:port/image:tag
和 http://my.private.registry:port/v2/docker/image/manifests/tag
已被捕获。
原文由 Zeinab Abbasimazar 发布,翻译遵循 CC BY-SA 4.0 许可协议
如果这是一个经过身份验证的注册表,那么您需要在构建它的机器上运行
docker login <registryurl>
。每个主机只需执行一次。然后该命令将身份验证缓存在文件中