Skip to content
Latchkey

Docker "failed to push: tag does not exist" - Push of an Unbuilt Tag in CI

A docker push (or buildx push) referenced a tag the local daemon never produced. Unlike a registry-side missing manifest, this is the push source: there is no such local tag to upload.

What this error means

A push step fails with tag does not exist / An image does not exist locally with the tag, naming the reference. The build may have produced a different tag (or none), so the push has nothing to send.

docker push output
An image does not exist locally with the tag: ghcr.io/myorg/api:1.4.2
# the build produced ghcr.io/myorg/api:latest, not :1.4.2

Common causes

The build produced a different tag

The image was built with one tag (or only an image ID) and the push references another, so the exact pushed tag does not exist locally.

Build and push ran on different runners

In a split pipeline, the tag created in the build job is not present on the runner doing the push, because the local image store is not shared across jobs.

A buildx build that loaded nothing locally

A buildx build without --load (or a multi-platform build, which cannot load) leaves no local image, so a subsequent plain docker push of that tag finds nothing.

How to fix it

Tag exactly what you push, at build time

Build with the final tag so the push reference exists locally.

Terminal
docker build -t ghcr.io/myorg/api:1.4.2 .
docker push ghcr.io/myorg/api:1.4.2

Push directly from buildx in one step

For buildx (and multi-platform), push as part of the build instead of a separate push.

Terminal
docker buildx build --push -t ghcr.io/myorg/api:1.4.2 .

How to prevent it

  • Use one canonical tag variable across build and push steps.
  • Build and push in the same job, or push straight from buildx.
  • For multi-platform builds, always push from buildx rather than a later docker push.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →