artifacts
On this page
Usage
ocm download artifacts [<options>] {<artifact>} Options
--dirtree extract as effective filesystem content
-h, --help help for artifacts
--layers ints extract dedicated layers
--oci-layout download as OCI Image Layout (blobs in blobs/<algorithm>/<encoded>)
-O, --outfile string output file or directory
--repo string repository name or spec
-t, --type string archive format (directory, tar, tgz) (default "directory")Description
Download artifacts from an OCI registry. The result is stored in artifact set format, without the repository part.
The files are named according to the artifact repository name.
By default, blobs are stored in OCM artifact set format (blobs/
If the repository/registry option is specified, the given names are interpreted relative to the specified registry using the syntax
<OCI repository name>[:<tag>][@<digest>]
If no –repo option is specified the given names are interpreted
as extended OCI artifact references.
[<repo type>::]<host>[:<port>]/<OCI repository name>[:<tag>][@<digest>]
The –repo option takes a repository/OCI registry specification:
[<repo type>::]<configured name>|<file path>|<spec json>
For the Common Transport Format the types directory,
tar or tgz are possible.
Using the JSON variant any repository types supported by the linked library can be used:
ArtifactSet: v1CommonTransportFormat: v1DockerDaemon: v1Empty: v1OCIRegistry: v1oci: v1ociRegistry
With option –layers it is possible to request the download of
dedicated layers, only. Option –dirtree expects the artifact to
be a layered filesystem (for example OCI Image) and provided the effective
filesystem content.
Option –oci-layout changes the blob storage structure in the downloaded
artifact. Without this option, blobs are stored in a flat directory at
blobs/<algorithm>.<encoded> (e.g., blobs/sha256.abc123…).
With this option, blobs are stored in a nested directory structure at
blobs/<algorithm>/<encoded> (e.g., blobs/sha256/abc123…)
as specified by the OCI Image Layout Specification
(see https://github.com/opencontainers/image-spec/blob/main/image-layout.md).
The –type option accepts a file format for the
target archive to use. It is only evaluated if the target
archive does not exist yet. The following formats are supported:
- directory
- tar
- tgz
The default format is directory.
See Also
- ocm download — Download oci artifacts, resources or complete components