Skip to content

Tag and push an image to a registry

Select an icon to see what it is.

Step 6 of 6

A tag moves, a digest does not

The CLI prints the digest dockerd received. Tags are movable names, and pushing another image as 1.0 would repoint it. A pull by digest always returns the same content.

$ docker pull registry.example.com/shop/web@sha256:<manifest-digest>
PrevNext

Final status object

{
"status": "1.0: digest: sha256:<manifest-digest> size: <bytes>"
}

Try it yourself

Tag an image for registry.example.com and push it. You need an account there, so log in first.

$ docker login registry.example.com
$ docker tag web:1.0 registry.example.com/shop/web:1.0
$ docker images --digests
$ docker push registry.example.com/shop/web:1.0
$ docker pull registry.example.com/shop/web:1.0

Quiz

1. What does docker tag do?
2. Why does dockerd send HEAD requests for blobs first?
3. Which is the stable identity of a pushed image?