podman-artifact-extract(1)

πŸ“¦
version 6.1.4 Β· 2 versions
, in arch rolling

πŸ’… podman-artifact-extract β€” like, the manual page, bestie ✨

okay so this is the podman-artifact-extract(1) page from the General Commands Manual, and I'm gonna walk you through it like we're texting at 2am 🫢


✨ NAME ✨

podman-artifact-extract β€” extract an OCI artifact to a local path. literally that's the whole vibe πŸŽ€


🌸 SYNOPSIS 🌸

podman artifact extract artifact target

πŸ¦‹ DESCRIPTION πŸ¦‹

So what it does: it extracts the blobs of an OCI artifact out to a local file or directory. simple. iconic. πŸ’…

Now here's the tea on how it decides stuff πŸ‘‘

If the target path is a file, or it doesn't exist yet, then the artifact must either consist of one blob (layer), or β€” if it's got multiple blobs (layers) β€” you have to use the --digest or --title option to select just a single blob. and if that file already exists? it gets overwritten. no cap, it's gone πŸ™ˆ

If the target is a directory (and bestie, it must exist β€” this isn't a "create it for you" situation), then all the blobs get copied into the target directory. The target file name comes from the value of the org.opencontainers.image.title annotation. If that annotation is missing, the target file name is just the digest of the blob β€” with : replaced by - in the name, iykyk. And yep, if the target file already exists in the directory, it will be overwritten too 😭


⭐ OPTIONS ⭐

  • --digest=digest β€” when extracting blobs from the artifact, only use the one with the specified digest. and lowkey important: if the target is a directory, then the digest is always used as the file name, even when the title annotation exists on the blob. conflicts with --title πŸ’€
  • --title=title β€” when extracting blobs from the artifact, only use the one with the specified title. it looks for the org.opencontainers.image.title annotation and compares that against the title you gave it. conflicts with --digest 🫢

🌈 EXAMPLES 🌈

Extract an artifact with a single blob:

$ podman artifact extract quay.io/artifact/foobar1:test /tmp/myfile

Extract an artifact with multiple blobs:

$ podman artifact extract quay.io/artifact/foobar2:test /tmp/mydir
$ ls /tmp/mydir
CONTRIBUTING.md  README.md

Extract only a single blob from an artifact with multiple blobs:

$ podman artifact extract --title README.md quay.io/artifact/foobar2:test /tmp/mydir
$ ls /tmp/mydir
README.md

Or using the digest instead of the title:

$ podman artifact extract --digest sha256:c0594e012b17fd9e6548355ceb571a79613f7bb988d7d883f112513601ac6e9a quay.io/artifact/foobar2:test /tmp/mydir
$ ls /tmp/mydir
README.md

πŸ‘€ SEE ALSO πŸ‘€

podman(1), podman-artifact(1) β€” go read those too, bestie, they're giving main character energy πŸ“šβœ¨


πŸŽ€ HISTORY πŸŽ€

Feb 2025, Originally compiled by Paul Holzinger pholzing@redhat.com ⟨mailto:pholzing@redhat.com⟩ 🫢


and that's the whole page!! this was podman-artifact-extract(1) from the General Commands Manual, written up Feb 2025 by Paul Holzinger β€” slay, thanks Paul πŸ’– go extract some artifacts, you've got this βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from