Skip to content
Latchkey

podman save and load: Move Images as Tarballs

podman save writes an image to a tar archive and podman load reads one back, useful for moving or caching images without a registry.

When two CI jobs share an image but you do not want a registry round-trip, save it to a tarball, cache the file, and load it in the next job.

What it does

podman save serializes an image and its layers into a tar archive on disk. podman load reconstructs the image from that archive into local storage. Both work offline and are how you cache or transfer images between jobs.

Common usage

Terminal
podman save -o app.tar ghcr.io/owner/app:1.2.3
podman load -i app.tar
# oci-archive format instead of docker
podman save --format oci-archive -o app.oci.tar myapp:latest

Options

FlagWhat it does
-o, --output <file>Write the archive to a file (save)
-i, --input <file>Read the archive from a file (load)
--format <fmt>Archive format: docker-archive, oci-archive, oci-dir
-q, --quietSuppress progress output
--compressCompress layers when writing (save)

In CI

Save the built image to a tarball, store it with the CI cache action keyed on the Dockerfile or commit, and podman load it in a downstream job to skip a rebuild. The default docker-archive format is the most portable across docker and podman.

Common errors in CI

"Error: open app.tar: no such file or directory" on load means the cache miss left no file; guard with a test before loading. "payload does not match any of the supported image formats" means the archive format does not match what load expects (an oci-archive given to a docker-archive consumer); save and load with consistent --format. A truncated cache produces an unexpected EOF during load.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →