Bamboo Docker 使用 Google Container Registry 构建错误

Bamboo Docker build Errors with Google Container Registry

我正在尝试 运行 构建 docker 图像的 Bamboo(私人服务器)任务。 docker 文件基于 google 容器注册表上的映像构建。 gcr.io/project-name/image-name:标签。但是,每当触发我的任务时,我都会收到构建错误。

检查日志,问题似乎是:

build   23-Aug-2018 20:08:52    Sending build context to Docker daemon 3.072 kB
build   23-Aug-2018 20:08:52    
build   23-Aug-2018 20:08:52    Step 1 : FROM gcr.io/project-name/image-name:tag
build   23-Aug-2018 20:08:52    Trying to pull repository gcr.io/project-name/image-name ... 
build   23-Aug-2018 20:08:52    Pulling repository gcr.io/project-name/image-name
error   23-Aug-2018 20:08:52    Error: Status 405 trying to pull repository project-name/image-name: "v1 Registry API is disabled. If you are not explicitly using the v1 Registry API, it is possible your v2 image could not be found. Verify that your image is available, or retry with `dockerd --disable-legacy-registry`. See https://cloud.google.com/container-registry/docs/support/deprecation-notices"
simple  23-Aug-2018 20:08:52    Failing task since return code of [/usr/bin/docker build --no-cache=true --force-rm=true --tag=gcr.io/project-name/out_image-name:outer_tag /var/atlassian/application-data/bamboo/xml-data/build-dir/3997697/AN-CA-JOB1] was 149 while expected 0

查看错误,我遇到了 this google troubleshooting page,这表明确认名称是正确的。 运行 命令,我可以确认名称 returns 结果。

此外,"retry with dockerd --disable-legacy-registry" 建议似乎过时了,因为 Docker 文档说:

The disable-legacy-registry configuration option has been removed and, when used, will produce an error on daemon startup.

我做错了什么?

其他详情:

原来问题是 Docker 的过时版本。