Images and Registries
Move images between hosts and registries. Results appear in the same fence: same-line # comments when short, multiline # blocks below the sample when not. Fences are bash, dockerfile, or yaml as appropriate.
Search across all documentation pages
Move images between hosts and registries. Results appear in the same fence: same-line # comments when short, multiline # blocks below the sample when not. Fences are bash, dockerfile, or yaml as appropriate.
Download an image.
docker pull nginx:alpine
# Status: Downloaded newer image for nginx:alpineRetag for a registry path.
docker tag myapp:1.0 ghcr.io/acme/myapp:1.0
# creates additional name for same image idUpload tags to a registry.
docker push ghcr.io/acme/myapp:1.0
# layers uploaded; digest printedImmutable reference by sha256.
docker image inspect --format='{{index .RepoDigests 0}}' nginx:alpine
# nginx@sha256:...Authenticate to a registry.
echo "$TOKEN" | docker login ghcr.io -u USER --password-stdin
# Login SucceededList local images.
docker images --format '{{.Repository}}:{{.Tag}} {{.ID}}'
# nginx:alpine sha256:...Remove local images.
docker rmi myapp:old
# Untagged / DeletedReclaim dangling image layers.
docker image prune -f
# Total reclaimed space: ...Offline transfer via tarball.
docker save myapp:1.0 | gzip > myapp.tar.gz
# gunzip -c myapp.tar.gz | docker loadReuse cache from registry (buildx).
docker buildx build --cache-from type=registry,ref=ghcr.io/acme/myapp:cache -t myapp:1.0 .
# faster CI rebuildsPush version + latest carefully.
docker tag myapp:1.0.3 myapp:1.0
docker push myapp:1.0.3 && docker push myapp:1.0
# both tags on registryInspect multi-arch indexes.
docker buildx imagetools inspect nginx:alpine
# shows platform manifestsSign/verify images in supply chain (tooling).
# cosign sign ghcr.io/acme/myapp@sha256:...
# cosign verify ...imagePullSecrets for private registries.
# yaml
# imagePullSecrets:
# - name: regcredPublic Hub rate limits - authenticate or mirror.
# docker login # raises pull limits for HubStack versions: Kubernetes 1.36.2 · Docker Engine 29.6.1 · Helm 3 · Compose v2 · containerd via CRI
Reviewed by Chris St. John·Last updated Jul 18, 2026