Skip to content
LatchkeyLatchkey home

docker save Command Reference

Save images to a tar archive.

docker save serializes one or more images, including all layers and metadata, into a tar stream. In CI it pairs with docker load to move a built image between jobs (via the artifact store) without a registry round trip.

Common flags

  • -o, --output - write to a file instead of stdout
  • Positional image references (one or more) to include in the archive

Example

shell
docker save -o image.tar myorg/app:${{ github.sha }}
gzip image.tar

In CI

Save the image to a tar, upload it as a job artifact, then docker load it in a downstream job. This avoids pushing intermediate images to a registry. Gzip the tar to cut artifact upload time and storage.

Key takeaways

  • save serializes full images (all layers) to a portable tar.
  • Pair with docker load to share images across jobs without a registry.
  • Gzip the archive to reduce artifact size and transfer time.

Frequently asked questions

docker save Command Reference?
docker save serializes one or more images, including all layers and metadata, into a tar stream. In CI it pairs with docker load to move a built image between jobs (via the artifact store) without a registry round trip.
In CI?
Save the image to a tar, upload it as a job artifact, then docker load it in a downstream job. This avoids pushing intermediate images to a registry. Gzip the tar to cut artifact upload time and storage.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card