Skip to content

Skopeo — inspect and copy container images without pulling them

Use Skopeo to inspect a container image in its registry, copy images between registries, and build mirrors for offline servers without pulling anything through Docker. You will also be able to check image signatures and keep whole repositories in sync on a schedule.

Skopeo is a command-line tool for working with container images while they stay in a registry, and this article shows platform and CI engineers how to use it. Usually, checking an image or moving it to another registry means pulling it through Docker first. That takes a running Docker daemon, local disk space and time. Skopeo talks to the registry over its web API instead. It can read the manifest, the small JSON file that lists an image’s layers and settings, and report the digest, a fingerprint that identifies one exact version of the image. It can also copy an image to another registry, or to a local folder in OCI format (the open, vendor-neutral image layout), with no daemon involved. That makes it a good fit for CI checks that pin images by digest, private mirrors, signature checks and air-gapped servers with no internet access.

How to verify

A Skopeo install is healthy if these probes succeed:

skopeo --version
skopeo inspect docker://docker.io/library/nginx:alpine | jq .Digest
skopeo inspect --raw docker://docker.io/library/nginx:alpine | jq '.layers | length'
skopeo list-tags docker://docker.io/library/nginx | jq '.Tags | .[:5]'
skopeo --insecure-policy login --get-login registry.example.com 2>&1 || true

The inspect call talks straight to the registry HTTP API — no daemon involved. --raw returns the unparsed OCI manifest JSON. If you see a JSON object back, your transport and auth are working.

What’s happening

Container images do not live on hosts — they live in registries, structured as a content-addressable graph of blobs and manifests. A manifest lists the layers and config for a single platform; a manifest list (or OCI index) points to multiple per-platform manifests. Pulling an image traditionally meant: fetch the manifest, fetch every layer blob, unpack them into local storage, register an image ID.

Skopeo does the registry-side work without the local-storage step. skopeo inspect reads a manifest. skopeo copy streams blobs between two transports without ever materialising them on disk in their unpacked form — the blobs go from source registry → buffer → destination registry. The supported transports include docker:// (remote registry), dir:// (local OCI directory), oci-archive: (single-file OCI tarball), containers-storage: (Podman/Buildah local store), and docker-daemon: (a running Docker daemon’s image store).

This is exactly what air-gapped environments need: pull from internet → write to tarball → carry across the gap → push to the offline registry. And it is what cross-registry mirrors need: copy from upstream → push to your private registry → repeat on a schedule.

The procedure

  1. Inspect an image’s metadata without pulling it. Useful for CI gates that pin to a digest:
skopeo inspect docker://registry.example.com/api:1.2.3 \
  | jq '{Digest, Created, Architecture, Os, Labels}'

skopeo inspect --raw docker://registry.example.com/api:1.2.3 \
  | jq '.config.digest, .layers[].digest'
  1. Copy an image between two registries without a Docker daemon and without local storage. This is the mirror primitive:
skopeo copy --all \
  docker://docker.io/library/postgres:16-alpine \
  docker://registry.example.com/mirror/postgres:16-alpine

--all copies every architecture in the manifest list — without it you get only your current platform, which breaks multi-arch consumers.

  1. Mirror to a local OCI directory (the format an air-gapped registry can consume directly):
mkdir -p /var/mirror/postgres-16
skopeo copy --all \
  docker://docker.io/library/postgres:16-alpine \
  oci:/var/mirror/postgres-16:16-alpine
ls -la /var/mirror/postgres-16/blobs/sha256/
  1. Sync a whole namespace between two registries using a YAML manifest:
# sync.yaml
registry.example.com:
  images-by-tag-regex:
    library/postgres: "^16-.*$"
    library/redis: "^7-.*$"
skopeo sync --src yaml --dest docker \
  sync.yaml \
  registry.example.com/mirror/

This is the recurring mirror job — run it from cron or GitLab CI.

  1. Verify the signature on a signed image without pulling it. With sigstore enabled in policy.json:
cat > /etc/containers/policy.json <<'EOF'
{
  "default": [{"type": "insecureAcceptAnything"}],
  "transports": {
    "docker": {
      "registry.example.com": [{
        "type": "sigstoreSigned",
        "keyPath": "/etc/containers/keys/release.pub"
      }]
    }
  }
}
EOF

skopeo inspect docker://registry.example.com/api:1.2.3
# fails if signature is missing or invalid
  1. Delete an image from a registry by digest. Most registries require this operation explicitly enabled:
skopeo delete docker://registry.example.com/api@sha256:abc123...

Common pitfalls

  • Copying without --all and silently breaking multi-arch consumers (ARM clients pulling an AMD64-only manifest).
  • Trusting :latest in mirror configs — by the time the sync runs, upstream may have moved. Mirror by tag pattern or digest, not by floating tag.
  • Skipping the policy.json (/etc/containers/policy.json) and getting “unable to find policy” errors. Either install the default policy or pass --insecure-policy.
  • Running skopeo copy from a job runner whose disk fills — even though Skopeo does not store images in unpacked form, the manifest and intermediate blob buffers transit through /var/tmp which is often too small on minimal runners.
  • Mirroring layer-by-layer and discovering that the source registry rate-limits unauthenticated pulls. Always authenticate against Docker Hub and similar before bulk-mirroring.

Stack Harbor runs Skopeo-driven mirrors as part of the managed operations baseline — every client registry pulls upstream images through a syndicated mirror with digest pinning and signature verification before the workload nodes ever see them.