crane
Copy container images between registries
TLDR
Log in to a registry
List the repos in a registry
List the tags in a repository
Pull remote images by reference and store their contents locally
Push local image contents to a remote registry
Efficiently tag a remote image
Efficiently copy a remote image while retaining the digest value
Delete an image reference from its registry
SYNOPSIS
crane [OPTIONS] <COMMAND> [<ARGS>]...
PARAMETERS
-h, --help
Show help for command
--insecure
Allow insecure (HTTP/non-TLS) registry connections
--platform <PLATFORM>
Set target platform (e.g., linux/amd64)
--platform-file <FILE>
Read platforms from file
--log-level <LEVEL>
Set logging level (debug,info,warn,error)
DESCRIPTION
Crane is a lightweight, standalone binary for interacting with container registries using the OCI distribution spec. It enables daemonless operations like pulling, pushing, copying, listing, and inspecting images without Docker or Podman. Ideal for CI/CD pipelines, air-gapped environments, and scripts needing registry access.
Key features include multi-platform support, layer rebase, manifest inspection, and verification with cosign. Crane fetches only necessary layers, supports tar exports, and handles authentication via standard mechanisms. It's written in Go, statically linked, and has no runtime dependencies, making it portable across Linux, macOS, and Windows.
CAVEATS
Does not build or run containers; registry ops only.
Push requires auth and write perms.
Large images may need significant disk space.
COMMON SUBCOMMANDS
pull <src> <dest>: Download image to tar.
push <src> <dest>: Upload tar to registry.
cp <src> <dest>: Copy between refs.
ls <repo>: List tags.
cat-config <img>: Show config JSON.
HISTORY
Developed by Google as part of go-containerregistry (2019+). Evolved for sigstore/cosign integration, emphasizing speed and minimalism over full Docker replacement.


