What it does
skopeo works directly with registries. skopeo inspect shows the labels, layers, architecture and digest of a remote image before you download it. skopeo copy moves an image between registries, local folders, archives and Podman storage — handy for mirrors in networks without internet. skopeo sync copies many images or tags at once. It also verifies and makes image signatures.
Images are named with a transport in front: docker:// (a registry), containers-storage: (Podman's local storage), dir: (a folder), oci: (an OCI layout folder), docker-archive: / oci-archive: (a tar file).
How to write it
skopeo [GLOBAL OPTION]... COMMAND [OPTION]... ARG...
skopeo inspect [OPTION]... TRANSPORT:IMAGE
skopeo copy [OPTION]... SOURCE DESTINATIONMain parts
Commands
inspectIMAGE- Show details of an image (labels, digest, layers, OS, arch).
copySRCDST- Copy an image from one place to another.
sync--srcT--destTSRCDST- Copy many images or a whole repository.
list-tagsIMAGE- List all tags of a repository.
deleteIMAGE- Mark an image for deletion in a registry.
login/logoutREGISTRY- Log in to / out of a registry.
manifest-digestFILE- Compute the digest of a manifest file.
generate-sigstore-key--output-prefixP- Make a sigstore key pair.
standalone-sign/standalone-verify- Sign or verify a manifest without a registry (debugging).
Transports
docker://REGISTRY/NAME:TAG- An image in a registry.
containers-storage:NAME- An image in the local Podman storage.
dir:PATH- Image files in a folder.
oci:PATH[:TAG]- An OCI image layout folder.
docker-archive:FILE/oci-archive:FILE- An image in a tar archive.
Options 32
Most used
Global options
inspect
copy
--dest-compress-format=FMT- Compress layers with
gziporzstd.
sync
Nothing matches this filter.
Examples 11
$ run as a normal user# run as root (or with sudo)
1Look at a remote image without pulling it
skopeo inspect docker://registry.access.redhat.com/ubi10/ubi skopeo inspect docker://registry.access.redhat.com/ubi10/ubi --format '{{.Name}} {{.Digest}} {{.Architecture}}' registry.access.redhat.com/ubi10/ubi sha256:4f0c... amd64Check the digest and labels before you trust an image.
2List the tags of a repository
skopeo list-tags docker://registry.access.redhat.com/ubi10/ubi | headChoose a fixed tag (or a digest) instead of
latestin production.3See the ports and the start command of an image
skopeo inspect --config docker://registry.access.redhat.com/ubi10/httpd-24 | jq '.config.ExposedPorts, .config.Cmd'4Check an image for another architecture
skopeo inspect --override-arch arm64 docker://registry.access.redhat.com/ubi10/ubi --format '{{.Architecture}}' arm645Copy an image into a private registry
skopeo login registry.example.com skopeo copy docker://registry.access.redhat.com/ubi10/ubi:latest docker://registry.example.com/base/ubi10:latestNo pull and push through local storage: the layers go straight from registry to registry.
6Copy all architectures of a multi-arch image
skopeo copy --all docker://registry.access.redhat.com/ubi10/ubi docker://registry.example.com/base/ubi107Take images to a server without internet
skopeo copy docker://registry.access.redhat.com/ubi10/httpd-24 oci-archive:httpd-24.tar scp httpd-24.tar admin@airgap1:/tmp/ skopeo copy oci-archive:/tmp/httpd-24.tar containers-storage:localhost/httpd-24:latestOn the offline server the image is now in Podman's storage.
8Copy a local Podman image to a registry
skopeo copy containers-storage:localhost/myweb:1.0 docker://quay.io/s0sta/myweb:1.09Mirror a list of images with sync
cat images.yaml registry.access.redhat.com: images: ubi10/ubi: [latest] ubi10/httpd-24: [latest] skopeo sync --src yaml --dest docker images.yaml registry.example.com/mirror skopeo sync --src docker --dest dir registry.access.redhat.com/ubi10/ubi /srv/mirror10Pin an image by digest (DevSecOps)
DIGEST=$(skopeo inspect docker://registry.access.redhat.com/ubi10/ubi --format '{{.Digest}}') echo "FROM registry.access.redhat.com/ubi10/ubi@$DIGEST"A digest never changes; a tag can. Pinned images make builds repeatable.
11Delete an old tag from a registry
skopeo delete docker://registry.example.com/base/ubi10:old
Nothing matches this filter.
Watch out
skopeo deleteonly marks the image; the registry removes the data at its next garbage collection.--tls-verify=falseturns off certificate checks. Use it only for a local test registry.- Login data is shared with Podman (
$XDG_RUNTIME_DIR/containers/auth.json).
Files
/etc/containers/policy.json- Signature policy: which images must be signed by whom.
/etc/containers/registries.d/- Where signatures are stored per registry.
/etc/containers/registries.conf- Registries, mirrors and blocked registries.
Tips to remember
skopeo inspect … | jqgives you any field of the JSON.- Use
skopeo syncin a cron job or timer to keep an internal mirror fresh.
Exit codes
0 | Success. |
1 | An error (image not found, login failed, network error). |