erbesharat / go-containerregistry

Go library and CLIs for working with container registries

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

go-containerregistry

Build Status GoDoc Go Report Card Code Coverage

Introduction

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. OCI image representation

Tools

This repo hosts some tools built on top of the library.

crane

crane is a tool for interacting with remote images and registries.

Installation

GO111MODULE=on go get -u github.com/google/go-containerregistry/cmd/crane

Images

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.10

And it's also available with a shell, which uses the debug tag

docker run --rm -it --entrypoint "/busybox/sh" gcr.io/go-containerregistry/crane:debug

gcrane

gcrane is a GCR-specific variant of crane that has richer output for the ls subcommand and some basic garbage collection support.

Installation

GO111MODULE=on go get -u github.com/google/go-containerregistry/cmd/gcrane

Images

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.10

And it's also available with a shell, which uses the debug tag

docker run --rm -it --entrypoint "/busybox/sh" gcr.io/go-containerregistry/gcrane:debug

k8schain

k8schain 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.

Debug images for crane and gcrane

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.

About

Go library and CLIs for working with container registries

License:Apache License 2.0


Languages

Language:Go 99.4%Language:Shell 0.6%