podman-artifact-add - Man Page

Add an OCI artifact to local artifact store

Synopsis

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

Description

Add an OCI artifact to the local store from the local filesystem.  You must provide at least one file to create the artifact, but several can also be added.

Artifacts automatically include a creation timestamp in the org.opencontainers.image.created annotation using RFC3339Nano format. When using the --append option, the original creation timestamp is preserved.

Options

--annotation=annotation=value

Set an annotation on the entry for the specified image or artifact.

Note: Set annotations for each file being added. The annotation "org.opencontainers.image.title" is used to name the layer when mounted into a container, this title must be unigue for each artifact layer.

--append, -a

Append files to an existing artifact. This option cannot be used with the --type option.

--file-type

Set the media type of the artifact file instead of allowing detection to determine the type

--help

Print usage statement.

--replace

If an artifact with the same name already exists, replace and remove it. The default is false. This option cannot be used with the --append option.

--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

See Also

podman(1), podman-artifact(1)

History

Jan 2025, Originally compiled by Brent Baude bbaude@redhat.com ⟨mailto:bbaude@redhat.com⟩

Referenced By

podman-artifact(1).

The man page docker-artifact-add(1) is an alias of podman-artifact-add(1).