This is a golang library for working with container registries. It's largely based on the Python library of the same name.
The following diagram shows the main types that this library handles.

This repo hosts some tools built on top of the library.
crane is a tool for interacting with remote images
and registries.
GO111MODULE=on go get -u github.com/google/go-containerregistry/cmd/crane
You can also use crane as docker image
$ docker run --rm gcr.io/go-containerregistry/crane ls ubuntu
2019/12/03 09:33:01 No matching credentials were found, falling back on anonymous
10.04
12.04.5
12.04
12.10And it's also available with a shell, which uses the debug tag
docker run --rm -it --entrypoint "/busybox/sh" gcr.io/go-containerregistry/crane:debuggcrane is a GCR-specific variant of crane that has
richer output for the ls subcommand and some basic garbage collection support.
GO111MODULE=on go get -u github.com/google/go-containerregistry/cmd/gcrane
You can also use gcrane as docker image
$ docker run --rm gcr.io/go-containerregistry/gcrane ls ubuntu
2019/12/03 09:33:01 No matching credentials were found, falling back on anonymous
10.04
12.04.5
12.04
12.10And it's also available with a shell, which uses the debug tag
docker run --rm -it --entrypoint "/busybox/sh" gcr.io/go-containerregistry/gcrane:debugk8schain implements the authentication
semantics use by kubelets in a way that is easily consumable by this library.
k8schain is not a standalone tool, but it's linked here for visibility.
crane and gcrane also provide a debug image (containing a shell), which can be found at
- gcr.io/go-containerregistry/crane:debug
- gcr.io/go-containerregistry/gcrane:debug
Inside these images, crane and gcrane can be used like this:
/ko-app/crane cp ...Emeritus: ko
This tool was originally developed in this repo but has since been moved to its own repo.