Work with containers' images
Switch branches/tags
Nothing to show
Clone or download
mtrmac Merge pull request #520 from mtrmac/search-order
Fix search order returned by sysregistriesv2 for v1 config files
Latest commit bd10b1b Oct 17, 2018
Failed to load latest commit information.
copy copy.Image(): return the image's manifest Oct 15, 2018
directory Add types.ImageDestination.IgnoresEmbeddedDockerReference Jun 4, 2018
docker In debug logs of Docker v1 ping, only call err.Error() if err != nil Oct 10, 2018
docs docs/: prefix manpages with "containers-" Aug 23, 2018
image Add a special case for GzippedEmptyLayer to storageImage.GetBlob Jul 13, 2018
internal tmpdir: unixTempDirForBigFiles can be overridden at build time May 7, 2018
manifest Fix build failures around error functions Oct 16, 2018
oci Fix build failures around error functions Oct 16, 2018
openshift Fix build failures around error functions Oct 16, 2018
ostree ostree: add missing error check on commit Sep 6, 2018
pkg Fix V1 compatibility code to preserve search registry order Oct 16, 2018
signature Put context.Context arguments on almost everything Apr 7, 2018
storage Fix build failures around error functions Oct 16, 2018
tarball Add TODO notes for places which do a lot of work on the local filesystem Apr 10, 2018
transports Make the docker-daemon transport stubbable Jul 23, 2018
types Issue #475 Add flag for image compress layer for oci destination Jul 12, 2018
version version: adjust variables Jun 27, 2016
.gitignore Issue #475 Add flag for image compress layer for oci destination Jul 12, 2018
.pullapprove.yml *: add pullapprove Jun 27, 2016
.travis.Dockerfile Update Go from 1.8.3 to 1.9.2 Jan 18, 2018
.travis.yml make and travis: cross platform compile check Jun 19, 2018 Modify to prefer smaller commits over squashing them Nov 6, 2017
LICENSE Move to Apache 2 license Jun 24, 2016
MAINTAINERS Add myself and Nalin to the list of Maintainers Aug 29, 2018
Makefile Makefile: fix golint Oct 13, 2018 Update fedora package requirements Oct 15, 2018
doc.go Fix the example in doc.go Apr 10, 2018
registries.conf fix manpage references to containers-registries.conf Aug 27, 2018
vendor.conf pkg: compression: support xz (lzma) decompression Jul 17, 2018

GoDoc Build Status

image is a set of Go libraries aimed at working in various way with containers' images and container image registries.

The containers/image library allows application to pull and push images from container image registries, like the upstream docker registry. It also implements "simple image signing".

The containers/image library also allows you to inspect a repository on a container registry without pulling down the image. This means it fetches the repository's manifest and it is able to show you a docker inspect-like json output about a whole repository or a tag. This library, in contrast to docker inspect, helps you gather useful information about a repository or a tag without requiring you to run docker pull.

The containers/image library also allows you to translate from one image format to another, for example docker container images to OCI images. It also allows you to copy container images between various registries, possibly converting them as necessary, and to sign and verify images.

Command-line usage

The containers/image project is only a library with no user interface; you can either incorporate it into your Go programs, or use the skopeo tool:

The skopeo tool uses the containers/image library and takes advantage of many of its features, e.g. skopeo copy exposes the containers/image/copy.Image functionality.


This library does not ship a committed version of its dependencies in a vendor subdirectory. This is so you can make well-informed decisions about which libraries you should use with this package in your own projects, and because types defined in the vendor directory would be impossible to use from your projects.

What this project tests against dependencies-wise is located in vendor.conf.


If you want to see what the library can do, or an example of how it is called, consider starting with the skopeo tool instead.

To integrate this library into your project, put it into $GOPATH or use your preferred vendoring tool to include a copy in your project. Ensure that the dependencies documented in vendor.conf are also available (using those exact versions or different versions of your choosing).

This library, by default, also depends on the GpgME and libostree C libraries. Either install them:

Fedora$ dnf install gpgme-devel libassuan-devel ostree-devel
macOS$ brew install gpgme

or use the build tags described below to avoid the dependencies (e.g. using go build -tags …)

Supported build tags

  • containers_image_openpgp: Use a Golang-only OpenPGP implementation for signature verification instead of the default cgo/gpgme-based implementation; the primary downside is that creating new signatures with the Golang-only implementation is not supported.
  • containers_image_ostree_stub: Instead of importing ostree: transport in, use a stub which reports that the transport is not supported. This allows building the library without requiring the libostree development libraries. The package is completely disabled and impossible to import when this build tag is in use.


Information about contributing to this project.

When developing this library, please use make (or make … BUILDTAGS=…) to take advantage of the tests and validation.


Apache License 2.0

SPDX-License-Identifier: Apache-2.0


  • Mailing list: containers-dev
  • IRC: #container-projects on