Bamboo Docker使用Google Container Registry构建错误

时间:2018-08-24 01:45:52

标签: docker bamboo google-container-registry

我正在尝试运行Bamboo(私有服务器)任务来构建docker映像。 dockerfile从google容器注册表上的图像构建。 gcr.io/项目名称/图像名称:标签。但是,无论何时触发任务,都会出现构建错误。

检查日志,问题似乎是:

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,这表明确认名称正确。运行命令,我可以确认名称返回结果。

此外,“重试dockerd --disable-legacy-registry”建议似乎已过时,因为Docker文档说:

  

disable-legacy-registry配置选项已删除,并且   使用时,将在守护程序启动时产生错误。

我在做什么错了?

其他详细信息:

  • 竹子6.4.1版内部版本60405

1 个答案:

答案 0 :(得分:1)

事实证明,该问题是Docker的过时版本。