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:
Bamboo version 6.4.1 build 60405
Turns out the issue is an outdated version of Docker.
Related
I have a Dockerfile with ARG before first FROM.
It builds correctly on my server (Docker version 20.10.7) however when I try to build it as part of GitLab CICD (GitLab version 13.7.4) within a DinD container (image docker:20.10.7) the build fails with the following message:
Please provide a source image with `from` prior to commit
I'll appreciate help with resolving this issue.
Thanks,
Barak
I am using the docker-publish.yml Github workflow to build and publish a Docker image on Github. The image is built successfully, but the workflow fails at the "Post Build and push Docker image" without any error message. Here is a link to the run, including the logs. It might be the size of the image, but I cannot tell. Any suggestions will be appreciated.
Configuring a mesos slave to use amazon ECR gives the following error when it receives a job:
Unsupported auth-scheme: BASIC
Does this look familiar to anyone ? I'm running the slave pointed to my user's docker config json file, which i updated by issuing a docker login beforehand.
Turns out it was my bad. I didn't modify the application that started this job to change the docker image name to include the registry as well.
Issue:
I am trying to maven build a proprietary application and the build fails with the following output:
repository [privatedockerimage] not found: does not exist or no pull access.
I am able to pull the dockerimage from our private docker repository. But when I tried to build the application, the application fails to build
checks
Docker daemon was running.
logged into my dockerhub account from command line. ( to pull the private docker image )
Expected Behavior
Build pass
Actual Behavior
repository [privatedockerimage] not found: does not exist or no pull
access.
Could you suggest what could be the possible issues. Unfortunately both the application and dockerimage are private and I can't provide exact steps to reproduce.
Thanks
if you have a free account on docker hub, you could store several private containers, but you must make your repo as public to be able to pull it.
It seems that you have only permission to pull the image.You don't have permission to build it since it is private repository.Please check what is your access level with your account.
I'm trying to run build Docker task to create a docker image. I set up a docker host, I'm using defautl Docker Hub as registry and my whole environment is on Azure.
When I queue a build task it fails at Task Docker.
Log output:
check path : null
task result: Failed
Not found docker: null
Finishing task: Docker
[error]Task Docker failed. This caused the job to fail. Look at the logs for the task for more details.
Does someone have any thought on what may be happening?
After looking into this, it would seem this happens if Docker is not properly installed on the build agent for the service principal the agent is running under.
Keep in mind that:
The Build must be run in a private agent, as the hosted ones do not yet have Docker installed, as per a very small footnote in the bottom of the documentation.
The VSTS agent must be running with a principal that has the environment variables set for docker to run; the default is LocalService account, which won't have that installed. This turns out to be a problem with other stuff as well and I've found it best to have a special user principal to run the agent under, that can also log into the system.
Fixing these two issues made it work for me.
I was able to switch the agent to Hosted VS2017 which has Docker support.
If Linux is an option, try Hosted Linux Preview