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--typeoption. 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 isfalse. and this one cannot be used with the--appendoption. 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
- arch rolling: podman-docker 6.1.4-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms