docker push says the tag does not exist
tag does not exist: <name>:<tag>Short answer
docker push sends exactly the name you type, and that name must already exist on your machine. The error means no local image carries it. Run docker image ls, then create the name you want with docker tag, including the registry host for a private registry, and push again.
Fix it fast
1Find out which cause you have
List local images and compare the exact repository and tag column with the name you passed to push. They must match character for character.
docker image ls2Match what you see, then jump to its fix
- 1
docker image ls shows the image, but under another repository name or tag than the one in the push commandThe image was built or pulled under a different nameFix - 2
You push to a private or cloud registry, for example registry.example.com:5000/team/app, but the local image has no host in its nameThe registry host is missing from the local nameFix - 3
You typed docker push myuser/app and the image only exists as myuser/app:1.0No tag was given, so Docker pushed latestFix
- 1
What does the error look like?
tag does not exist: <name>:<tag>An image does not exist locally with the tag: <name>
Cause 1 of 3
The image was built or pulled under a different name
1Check
Pushing does not rename anything. A build with -t app:dev creates app:dev only. Pushing myuser/app:1.0 needs an image with that name.
docker image ls --filter reference='myuser/*'2Fix
Add the missing name to the existing image with docker tag, then push that name. The source can be a name or an image ID.
docker tag app:dev myuser/app:1.0
docker push myuser/app:1.03Verify
The push starts uploading layers and ends with a digest line.
docker image ls myuser/appConfirmed by docs.docker.com
Cause 2 of 3
The registry host is missing from the local name
1Check
Docker decides where to push from the host part of the name. Without it, the name means Docker Hub. Giving the registry only at push time does not link it to a locally tagged image.
docker image ls | grep app2Fix
Tag the image with host, optional port, namespace and repository, then push that full name.
docker tag app:dev registry.example.com:5000/team/app:1.0
docker push registry.example.com:5000/team/app:1.03Verify
docker image ls lists the full registry name, and the push finishes.
docker image ls registry.example.com:5000/team/appConfirmed by docs.docker.com
Cause 3 of 3
No tag was given, so Docker pushed latest
1Check
A name without a tag means latest. The CLI adds it for you and prints a line starting with 'Using default tag'. If no image named latest exists locally, the push fails.
docker image ls myuser/app2Fix
Push the tag you actually have, or create the latest tag from it.
docker push myuser/app:1.0
# or
docker tag myuser/app:1.0 myuser/app:latest
docker push myuser/app:latest3Verify
The push completes for the tag you named.
docker image ls myuser/appConfirmed by raw.githubusercontent.com
How do I stop it coming back?
- Build with the final name in the first place: docker build -t registry.example.com:5000/team/app:1.0 .
- In CI, store the full image name in one variable and use it for build, tag and push.
- Always write the tag in push commands, so you never depend on the latest default.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Servers
docker push is denied: requested access to the resource is denied
push access denied, repository does not exist or may require authorization
The registry refused the push.
3 causes, each with a fixServers
apk cannot find py-pip in an Alpine Docker image
py-pip (no such package):
On current Alpine releases there is no package called py-pip.
2 causes, each with a fixServers
ng serve runs in the container but localhost:4200 does not open
The browser cannot open localhost:4200 although ng serve is running in the container
ng serve listens on localhost by default, which inside a container is the container itself.
3 causes, each with a fixServers
Angular routes return 404 from nginx when you refresh or open a link
The home page loads, but refreshing /some/route shows an nginx 404
Angular routes like /users/42 are not files, so nginx looks for them on disk and returns 404.
3 causes, each with a fixServers
AH00558: Apache in Docker cannot reliably determine its fully qualified domain name
Set the 'ServerName' directive globally to suppress this message
AH00558 is a warning, not a crash.
2 causes, each with a fixServers
Apache in a Docker container logs AH01114 when it proxies to a backend
AH01114: HTTP: failed to make connection to backend: api
Apache's proxy worker could not open a connection to the address in ProxyPass.
5 causes, each with a fix