LinuxCommandLibrary

crane

TLDR

Pull image

$ crane pull [registry/image:tag] [output.tar]
copy
Push image
$ crane push [image.tar] [registry/image:tag]
copy
Copy image between registries
$ crane copy [src/image:tag] [dst/image:tag]
copy
List tags for image
$ crane ls [registry/image]
copy
Get image digest
$ crane digest [registry/image:tag]
copy
Get image manifest
$ crane manifest [registry/image:tag]
copy
Get image configuration
$ crane config [registry/image:tag]
copy
Authenticate to registry
$ crane auth login [registry] -u [user] -p [password]
copy

SYNOPSIS

crane command [options] [arguments]

DESCRIPTION

crane is a tool for interacting with container registries. It can pull, push, copy, and inspect container images without requiring a container runtime like Docker. Part of the go-containerregistry project.

PARAMETERS

--platform os/arch

Target platform (e.g., linux/amd64)
--insecure
Allow insecure registry connections
-v, --verbose
Verbose output

COMMANDS

pull

Download image as tarball
push
Upload tarball as image
copy
Copy image between registries
ls
List tags for repository
digest
Get image digest
manifest
Get image manifest
config
Get image config
catalog
List repositories in registry
auth
Manage registry authentication
append
Append layers to image
flatten
Flatten image layers
mutate
Modify image metadata
validate
Validate image
export
Export filesystem from image

ENVIRONMENT

DOCKER_CONFIG

Path to Docker config for credentials

CAVEATS

Does not require Docker daemon. Uses OCI registry API directly. Credentials read from Docker config by default.

SEE ALSO

docker(1), skopeo(1), cosign(1)

Copied to clipboard