vpctl artifact command
Mirror Docker images, ORAS artifacts, and OCI Helm charts between registries.
読み終わるまでの所要時間 2 分最終更新 1日前
Before you deploy, sync artifacts from the source registry () to the target registry (). Use one of these subcommands for the artifact type:
artifactSync.sourceRepositoryconfiguration.kubernetes.docker.repository- — Docker container images (uses
vpctl artifact sync images/docker pull/tag)push - — ORAS artifacts (registry-to-registry copy via
vpctl artifact sync oras)oras-go - — OCI Helm charts (registry-to-registry copy via
vpctl artifact sync charts; runs only whenoras-gois set in the manifest)deployment.helmChartMode: "remote"
The manifest's is used to prefix image paths on the target registry when set.
docker.namespacePreflight
Verify your Docker and ORAS credentials are working before you run a full sync:
vpctl artifact sync preflight
The command picks one Docker image, one ORAS artifact, and one Helm chart (when ) from the release and attempts to sync them. A successful run confirms pull/push credentials. On failure, the command prints troubleshooting hints, such as expired tokens or a missing .
helmChartMode: "remote"docker loginSync Docker images
-
Authenticate to both source and target registries before you sync:docker login <source-registry>docker login <target-registry>
-
Preview the commands that would be executed:vpctl artifact sync images --dry-run
-
Run the sync:vpctl artifact sync images
Options:
- : Show commands without executing (default: false)
--dry-run - : Target registry URL (defaults to manifest value)
--target-registry - : Path to extracted release (defaults to
--extracted-release)./extracted-release - : Filter to sync only images that match a name pattern
--name - : Remove local images (
--cleanup) after each push (default: false)docker rmi - : Skip images already present on the target registry (default: false)
--skip-existing - : Set how many images sync in parallel. CLI flag default:
--concurrency(sequential). If omitted, the manifest value1applies. Manifest default:artifactSync.concurrency.5
Example for CI: skip existing, cleanup disk.
vpctl artifact sync images --skip-existing --cleanup
Sync ORAS artifacts
ORAS artifact sync reads authentication from Docker's credential store () automatically. Run for both source and target registries before you sync.
~/.docker/config.jsondocker loginvpctl artifact sync oras --dry-run
This shows the commands that would be executed.
oras copyvpctl artifact sync oras
Options:
- : Show commands without executing (default: false)
--dry-run - : Target registry URL (defaults to manifest value)
--target-registry - : Path to extracted release (defaults to
--extracted-release)./extracted-release - : Filter to sync only ORAS artifacts matching a name pattern
--name - : Number of artifacts to sync in parallel. CLI flag default:
--concurrency(sequential). When the flag is omitted, the manifest value1applies (manifest default:artifactSync.concurrency).5
Sync OCI Helm charts
OCI Helm chart sync mirrors only the charts marked in . It runs only when the manifest sets ; if the mode is (the default), the command exits without syncing anything. Authentication is read from Docker's credential store (), so run for both source and target registries before you sync.
type: "remote"versions.yamldeployment.helmChartMode: "remote""local"~/.docker/config.jsondocker loginvpctl artifact sync charts --dry-run
This shows the commands that would be executed.
oras copyvpctl artifact sync charts
Options:
- : Show commands without executing (default: false)
--dry-run - : Target registry URL (defaults to manifest value)
--target-registry - : Path to extracted release (defaults to
--extracted-release)./extracted-release - : Filter to sync only Helm charts matching a name pattern
--name - : Number of charts to sync in parallel (default:
--concurrency, sequential)1
Full sync example with ECR
# Authenticate to both registries (Docker prompts for the password)aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin <account>.dkr.ecr.us-east-1.amazonaws.comdocker login -u <user> uccmpprivatecloud.azurecr.io# Preflight: verify authentication worksvpctl artifact sync preflight# Sync Docker imagesvpctl artifact sync images --skip-existing --cleanup# Sync ORAS artifacts (reads Docker credential store automatically)vpctl artifact sync oras
In automated environments, pipe the password from a secret store with instead of passing on the command line. The flag writes the password to your shell history and to the process list (visible to ), and Docker prints when you use it.
--password-stdin-p <password>-pps auxWARNING! Using --password via the CLI is insecure