crane(1)
Crane is a tool for reading, writing, and manipulating container images without requiring a container runtime.
Synopsis
crane [COMMAND] [OPTIONS] [ARGS]Description
Crane is a CLI tool for interacting with remote container images and registries. It allows you to inspect, copy, and modify container images directly without needing Docker or another container runtime installed.
Common operations include pulling image metadata, examining layers, copying images between registries, and authenticating with private registries. Crane works with OCI-compliant registries like Docker Hub, Google Container Registry, and private registries.
Common options
| Flag | What it does |
|---|---|
--help, -h | show help message for a command |
--insecure | allow HTTP (non-HTTPS) registry connections |
--platform | specify platform (e.g., linux/amd64, linux/arm64) |
--allow-insecure-registries | allow insecure registry connections without SSL verification |
-v, --verbose | enable verbose/debug output |
Examples
pull a container image from a registry and save it as a tar file
crane pull gcr.io/myproject/myimage:latest image.tarpush a tar image to a remote registry
crane push image.tar myregistry.com/myrepo/myimage:v1.0get the digest (SHA256 hash) of an image in a registry
crane digest gcr.io/myproject/myimage:latestdisplay the image configuration (metadata) in JSON format
crane config gcr.io/myproject/myimage:latestlist all image tags available in a registry repository
crane ls gcr.io/myprojectcopy an image directly from one registry to another
crane copy gcr.io/source/image:latest myregistry.com/dest/image:latestretrieve and display the manifest of an image
crane manifest docker.io/library/ubuntu:latestdownload a specific image layer blob by its digest
crane blob gcr.io/myproject/myimage@sha256:abc123... > layer.tar.gz