Skopeo — Registry-Agnostic Container Image Toolkit
Skopeo inspects, copies, signs, and deletes container images across registries without a daemon — the Swiss Army knife for OCI image plumbing in CI pipelines.
Agent 可直接安装
这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。
npx -y tokrepo@latest install 842a75aa-3908-11f1-9bc6-00163e2b0d79 --target codex先 dry-run 确认安装计划,再运行此命令。
What it is
Skopeo is a command-line utility for performing operations on container images and image registries. It can inspect, copy, sign, and delete images across any OCI-compliant or Docker registry without requiring a running Docker daemon. Skopeo is part of the Red Hat containers ecosystem alongside Podman, Buildah, and CRI-O.
DevOps engineers, CI pipeline authors, and platform teams who need to mirror, audit, or transfer container images across registries will find Skopeo essential. It supports multiple transports including Docker registries, OCI layouts, OCI archives, and local directories.
How it saves time or tokens
Traditional image mirroring requires pulling an image to a local Docker daemon and then pushing it to a destination registry. Skopeo performs registry-to-registry copies directly, skipping the local storage layer entirely. This eliminates disk I/O overhead and reduces pipeline execution time. For air-gapped environments, skopeo sync can mirror entire repositories in a single command rather than scripting individual pull-tag-push sequences.
How to use
- Install Skopeo via your package manager (
brew install skopeoon macOS,apt install skopeoon Debian/Ubuntu) - Inspect a remote image to check its manifest and layers:
skopeo inspect docker://alpine:latest
- Copy images between registries without a local daemon:
skopeo copy docker://quay.io/prometheus/prometheus:latest \
docker://registry.example.com/prom/prometheus:latest
- Mirror a full repository for air-gapped deployments:
skopeo sync --src docker --dest dir registry.io/myorg/myapp /local/mirror/
Example
# Inspect image metadata without pulling
skopeo inspect docker://nginx:1.25 | jq '.Digest, .Architecture'
# Copy to an OCI layout for offline transfer
skopeo copy docker://postgres:16 oci:./oci-layout:postgres:16
# List all tags in a remote repository
skopeo list-tags docker://docker.io/library/python
# Sign an image on copy with cosign
skopeo copy --sign-by key@example.com \
docker://src-registry.io/app:v1 \
docker://dst-registry.io/app:v1
Related on TokRepo
- DevOps Automation Tools -- explore automation workflows for CI/CD pipelines
- Self-Hosted Tools -- discover self-hosted infrastructure tools
Common pitfalls
- Skopeo does not build images. Use Buildah or Docker for image creation, then Skopeo for transport.
- Authentication credentials must be configured per-registry via
skopeo loginor~/.docker/config.json. Missing auth causes cryptic 401 errors. - The
synccommand mirrors all tags by default. Use--scopedto preserve repository paths and avoid tag collisions in the destination.
常见问题
Docker requires a running daemon to pull, tag, and push images. Skopeo operates directly against registry APIs without any daemon, making it faster for CI pipelines and safer in rootless environments. Skopeo also supports direct registry-to-registry copies without intermediate local storage.
Yes. Skopeo supports any OCI-compliant or Docker v2 registry. You can copy images from Docker Hub to AWS ECR, GCR, Azure ACR, Quay, Harbor, or any private registry in a single command without pulling to local storage first.
Yes. Skopeo integrates with Sigstore and GPG signing. You can sign images during copy operations using the --sign-by flag, and verify signatures on inspect. This enables supply chain security in air-gapped or regulated environments.
Skopeo reads credentials from ~/.docker/config.json or its own auth file at $XDG_RUNTIME_DIR/containers/auth.json. You can also use skopeo login to authenticate interactively, or pass --creds username:password for scripted use in CI.
The sync subcommand mirrors entire repositories or selected tags from one registry to another, or to a local directory. It is designed for air-gapped deployments where you need an offline copy of upstream images, and it handles incremental syncing to avoid re-downloading unchanged layers.
引用来源 (3)
- Skopeo GitHub— Skopeo performs operations on container images and registries without a daemon
- Red Hat Containers— Part of the Red Hat containers ecosystem with Podman, Buildah, CRI-O
- Skopeo README— Supports OCI image layout, Docker v2, and multiple transport formats
讨论
相关资产
Distribution — The OCI Container Registry Toolkit
The reference implementation of the OCI Distribution Specification for storing and distributing container images and artifacts. Distribution powers Docker Hub, GitHub Container Registry, and most private registries behind the scenes.
Harbor — Cloud Native Trusted Container Registry
Harbor is a CNCF-graduated open-source container registry that stores, signs, and scans container images. Vulnerability scanning, RBAC, replication, and OCI support.
Concourse — Container-Native CI/CD with Pipelines as Code
Build reliable CI/CD pipelines with Concourse. Every step runs in an isolated container, pipelines are declarative YAML, and the resource model makes dependencies explicit and reproducible.
GitLab CE — Open Source DevOps Platform with Built-In CI/CD
GitLab Community Edition is a complete DevOps platform delivered as a single application, covering source code management, CI/CD pipelines, issue tracking, container registry, and more.