podman-save(1)

πŸ’Ύ podman-save(1) β€” save image(s) to an archive or directory, bestie, it's iconic

Okay so real talk, this is the podman-save page from the General Commands Manual and honestly? It's giving "let me tuck your fave image away somewhere safe so you can pull it back out later" and I am obsessed. πŸ’– Let's get into it.


✨ SYNOPSIS ✨

podman save [options] name[:tag]

podman image save [options] name[:tag]

πŸ¦‹ DESCRIPTION πŸ¦‹

So podman save literally saves an image to a local file or directory. It writes to STDOUT by default, and you can redirect that to a file using the output flag. The quiet flag suppresses the output when it's set. It saves parent layers of the image(s), and those image(s) can be loaded back with podman load. If you wanna export containers instead, that's a whole different vibe β€” use podman export.

πŸ’€ Heads up: : is a restricted character and cannot be part of the file name. Periodt.

podman save operates on images: the resulting archive (OCI or docker-archive) preserves the image's layers, history and tags, and it gets restored as the same image with podman load. This is different from podman export, which flattens a container's filesystem into a single-layer tarball with no image history. To capture a container's filesystem instead, see podman-export(1). No cap, they're different things and the way that people mix them up is honestly a tragedy. 😭


πŸŽ€ OPTIONS πŸŽ€

  • --compress β€” compresses tarball image layers when pushing to a directory using the 'dir' transport. (default is same compression type, compressed or uncompressed, as source) ✨
Note: this flag can only be set with --format=docker-dir. That's the rule, bestie, don't fight it.
  • --format=format β€” the image format to produce, one of:
    • docker-archive β€” a tar archive interoperable with docker load(1) (the default) πŸ‘‘
    • oci-archive β€” a tar archive using the OCI Image Format πŸ¦‹
    • oci-dir β€” a directory using the OCI Image Format 🌸
    • docker-dir β€” dir transport (see containers-transports(5)) with v2s2 manifest type πŸ’…
Note: oci-dir and docker-dir cannot be loaded with podman load on Podman remote clients (including macOS and Windows, excluding WSL2). Sorry, remote girlies, that's just how it is. πŸ™ˆ
  • --help, -h β€” print usage statement. Classic, iconic, always there for you.
  • --multi-image-archive, -m β€” allows for creating archives with more than one image. Additional names are interpreted as images instead of tags. Only supported for --format=docker-archive. The default for this option can be modified via the multi_image_archive="true"|"false" flag in containers.conf. πŸ”₯
  • --output, -o=file β€” write to a file, default is STDOUT. Slay.
  • --quiet, -q β€” suppress the output. Peace and quiet, we love to see it. 🧚
  • --uncompressed β€” accept uncompressed layers when using one of the OCI formats.

🌈 EXAMPLES 🌈

Save image to a local file without displaying progress. So chill, so demure.

$ podman save --quiet -o alpine.tar alpine:2.6

Save image to stdout and redirect content via shell. The redirect is the main character here.

$ podman save alpine > alpine-all.tar

Save image in oci-archive format to the local file. OCI girlies rise.

$ podman save -o oci-alpine.tar --format oci-archive alpine

Save image compressed in docker-dir format. Watch the progress bars do their little thing ✨:

$ podman save --compress --format docker-dir -o alp-dir alpine
Getting image source signatures
Copying blob sha256:2fdfe1cd78c20d05774f0919be19bc1a3e4729bce219968e4188e7e0f1af679d
 1.97 MB / 1.97 MB [========================================================] 0s
Copying config sha256:501d1a8f0487e93128df34ea349795bc324d5e0c0d5112e08386a9dfaff620be
 584 B / 584 B [============================================================] 0s
Writing manifest to image destination
Storing signatures

πŸ‘€ SEE ALSO πŸ‘€

podman(1), podman-load(1), containers.conf(5), containers-transports(5) β€” go read them, iykyk. 🫢


⭐ HISTORY ⭐

July 2017, originally compiled by Urvashi Mohnani umohnani@redhat.com ⟨mailto:umohnani@redhat.com⟩. Respect the OG. πŸ’œ


Okay that's the whole page, bestie! This was podman-save(1) from the General Commands Manual, and ily for reading all the way to the bottom. Now go save some images, slay, bye! πŸŒΈπŸ¦‹πŸ’…

πŸ“¦ where this page comes from