I'm attempting to run a Bamboo (private server) task that builds a docker image. The dockerfile builds from an image on google container registry. gcr.io/project-name/image-name:tag. However, whenever my task is triggered, I get a build error.
Checking the log, the issue appears to be:
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
Looking into the error, I came across this google troubleshooting page, which suggests confirming the names are right. Running the command, I can confirm the name returns results.
Additionally, the "retry with dockerd --disable-legacy-registry
" suggestion seems dated, since the Docker docs say:
The disable-legacy-registry configuration option has been removed and, when used, will produce an error on daemon startup.
What am I doing wrong?
Other details:
Turns out the issue is an outdated version of Docker.