Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to push to Docker Hub - tag does not exist

Have been bumping my head against the wall on this one for a while.

Build Rules

And while the "latest" tag builds just fine, the "dev" tag (or any other tag I have attempted does not.

Removing intermediate container df365d3a022f ---> dd24ff34c9e9 Successfully built dd34ff34c9e9 Successfully tagged myrepo/app:latest Pushing index.docker.io/myrepo/app:dev... Push failed. Attempt 2 in 60 seconds. Push failed. Attempt 3 in 60 seconds. Push failed. Attempt 4 in 60 seconds. Push failed. Attempt 5 in 60 seconds. {u'message': u'tag does not exist: myrepo/app:dev'}

When I build locally I can push that same tag to the Docker Hub:

docker push docker.io/nomadcalendar/app:dev The push refers to repository [docker.io/myrepo/app] a69634ab3c0f: Preparing 0daa743ba1bd: Preparing ... 030309cad3ba: Layer already exists dev: digest: sha256:9a828hgh5ccabd3364666cb20774f53dc1b5e1563329f8fd801edcae4b50f30 size: 16805

And even when the tag built locally and pushed to the Docker Hub appears in Docker hub, I am still unable to use that tag in the Docker Hub Automated Builds

Any suggestions?

like image 212
user3521621 Avatar asked Mar 26 '21 23:03

user3521621


2 Answers

In my case, the issue was related to the build hooks that were enabled through a "hooks" folder in the root directory of the project. Removing hooks fixed the issue.

like image 184
user3521621 Avatar answered Oct 05 '22 13:10

user3521621


Looks like an issue when you try to build two different tags from the same trigger. In this case both dev and latest are configured to build off of master, and the build command creates one tag but tries to push the other. For now, you'll want to push only a single tag for the master branch, rather than two rules for different tags.

In github, I'd recommend following and adding feedback on hub-feedback issue 1828 which looks similar to your issue.

like image 30
BMitch Avatar answered Oct 05 '22 13:10

BMitch