podman-artifact-add(1)

πŸ’… podman-artifact-add(1) β€” from the General Commands Manual, bestie

okay so picture this: you're in the podman-artifact-add(1) era and you want to know how to add an OCI artifact to your local artifact store. this is the page. let's go ✨


🌸 NAME

podman-artifact-add β€” add an OCI artifact to the local artifact store. literally that's it, that's the whole job 🫢


✨ SYNOPSIS

podman artifact add [options] artifact-name file [file ...]

πŸ¦‹ DESCRIPTION

So you're adding an OCI artifact to the local store, straight from your local filesystem. easy.

You must give at least one file to create the artifact β€” like, the artifact doesn't exist without it, no cap. But you can absolutely throw several files in there too, more is more πŸ’…

Artifacts automatically come with a creation timestamp baked into the org.opencontainers.image.created annotation, and that timestamp is in RFC3339Nano format. fancy, I know.

but wait β€” when you use the --append option, the original creation timestamp is preserved. so your OG timestamp stays iconic, it does not get replaced. periodt.

πŸŽ€ OPTIONS

  • --annotation=annotation=value β€” set an annotation on the entry for the specified image or artifact.
πŸ’€ Note: you set annotations for each file being added. The annotation "org.opencontainers.image.title" is what names the layer when it gets mounted into a container β€” and this title must be unigue for each artifact layer (that's the page's spelling, not mine, don't come for me πŸ™ˆ).
  • --append, -a β€” append files to an existing artifact. ngl this one cannot be used with the --type option. they're not friends.
  • --file-type β€” set the media type of the artifact file yourself, instead of letting detection figure out the type for you. main character energy πŸŽ€
  • --replace β€” if an artifact with the same name already exists, replace it and remove it. the default is false. and this one cannot be used with the --append option. pick a lane bestie.
  • --type β€” set a type for the artifact being added. 🌈

πŸ”₯ EXAMPLES

Add a single file to an artifact

$ podman artifact add quay.io/myartifact/myml:latest /tmp/foobar.ml
0fe1488ecdef8cc4093e11a55bc048d9fc3e13a4ba846efd24b5a715006c95b3

Add OCI artifact to the store with type:

$ podman artifact add --artifact-type application/com.example.ai --file-type application/vnd.gguf quay.io/myimage/myartifact:latest /home/user/model.gguf

Replace an existing artifact with the same name

$ podman artifact add quay.io/myartifact/myml:latest /tmp/foobar.ml
0fe1488ecdef8cc4093e11a55bc048d9fc3e13a4ba846efd24b5a715006c95b3

Add multiple files to an artifact

$ podman artifact add quay.io/myartifact/myml:latest /tmp/foobar1.ml /tmp/foobar2.ml
1487acae11b5a30948c50762882036b41ac91a7b9514be8012d98015c95ddb78

Add files to an existing OCI artifact

$ podman artifact add --append quay.io/myimage/myartifact:latest /home/user/config.yaml

Create artifact with the layer title name being replaced, and then mount into a container.

podman artifact add --annotation org.opencontainers.image.title=smollm2 quay.io/myreg/smollm2:latest blobs/sha256-4d2396b16114669389d7555c15a1592aad584750310f648edad5ca8c4eccda17
podman run --mount type=artifact,source=quay.io/myreg/smollm2:latest,destination=/mnt fedora ls -l /mnt
smollm2

like look at that. the title got replaced, the layer mounted, and smollm2 showed up. obsessed 😭πŸ”₯


πŸ‘‘ SEE ALSO

podman(1), podman-artifact(1) β€” go read those next, iykyk πŸ’–


🧚 HISTORY

Jan 2025, originally compiled by Brent Baude bbaude@redhat.com ⟨mailto:bbaude@redhat.com⟩ β€” ty for your service king 🫢


okay that's the whole page!! this has been podman-artifact-add(1) from the General Commands Manual, the Jan 2025 edition, written by Brent Baude bbaude@redhat.com β€” go add some artifacts bestie, slay πŸ’…βœ¨πŸŽ€

πŸ“¦ where this page comes from