Work with containers' images
Go to file
Daniel J Walsh ae7286da6c
Merge pull request #1239 from cevich/add_ci_docs
Cirrus: Support [CI:DOCS] mode
2021-06-11 14:43:44 -04:00
.github Upgrade to GitHub-native Dependabot 2021-05-01 07:18:32 -04:00
contrib/cirrus Cirrus: Improve test synchronization with c/skopeo 2021-04-21 10:47:53 -04:00
copy update mpb to v7.0.2 2021-06-07 09:52:11 +02:00
directory Fix up errors linter is complaining about 2021-01-19 17:03:52 -05:00
docker Spelling 2021-03-23 14:37:37 -04:00
docs Enable subdomain matching in registries.conf 2021-04-09 11:33:56 -04:00
hack Cirrus: Improve test synchronization with c/skopeo 2021-04-21 10:47:53 -04:00
image Spelling 2021-03-23 14:37:37 -04:00
internal copy: re-enable early commits 2021-06-02 17:14:33 +02:00
manifest Spelling 2021-03-23 14:37:37 -04:00
oci oci/layout: remove debug log 2021-04-16 08:46:30 +02:00
openshift Spelling 2021-03-23 14:37:37 -04:00
ostree blobinfocache: track compression types for locations 2021-01-16 13:58:15 -05:00
pkg Add SetCredentials which returns human-readable path for configured auth 2021-06-08 13:34:45 +05:30
signature Spelling 2021-03-23 14:37:37 -04:00
storage copy: re-enable early commits 2021-06-02 17:14:33 +02:00
tarball tarball: fix example code 2020-12-08 09:21:40 -08:00
transports Update to major version v5 2019-10-25 22:27:45 +02:00
types Spelling 2021-03-23 14:37:37 -04:00
version bump to v5.12.1-dev 2021-05-04 11:06:59 +02:00
.cirrus.Dockerfile Cirrus: Migrate from Travis CI 2021-03-11 11:20:18 +01:00
.cirrus.yml Merge pull request #1239 from cevich/add_ci_docs 2021-06-11 14:43:44 -04:00
.gitignore Issue #475 Add flag for image compress layer for oci destination 2018-07-12 17:50:17 +05:30
.golangci.yml Enable Cirrus validation tests 2019-12-04 11:01:17 +01:00
.pullapprove.yml *: add pullapprove 2016-06-27 16:34:59 +02:00
CODE-OF-CONDUCT.md Fix docs links due to branch rename 2021-06-10 11:23:41 -04:00
CONTRIBUTING.md one commit 2021-04-06 21:50:49 -04:00
LICENSE Move to Apache 2 license 2016-06-24 11:35:34 -07:00
MAINTAINERS add @vrothberg to the list of MAINTAINERS 2019-01-11 16:33:51 +01:00
Makefile Cirrus: Migrate from Travis CI 2021-03-11 11:20:18 +01:00
README.md Cirrus: Migrate from Travis CI 2021-03-11 11:20:18 +01:00
SECURITY.md Fix docs links due to branch rename 2021-06-10 11:23:41 -04:00
doc.go Update to major version v5 2019-10-25 22:27:45 +02:00
go.mod build(deps): bump github.com/docker/docker-credential-helpers 2021-06-09 09:15:14 +00:00
go.sum build(deps): bump github.com/docker/docker-credential-helpers 2021-06-09 09:15:14 +00:00
registries.conf Enable subdomain matching in registries.conf 2021-04-09 11:33:56 -04:00

README.md

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.

Dependencies

This library ships as a Go module.

Building

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, include it as a Go module, put it into $GOPATH or use your preferred vendoring tool to include a copy in your project. Ensure that the dependencies documented in go.mod 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: Import ostree: transport in github.com/containers/image/transports/alltransports. This builds the library requiring the libostree development libraries. Otherwise a stub which reports that the transport is not supported gets used. The github.com/containers/image/ostree package is completely disabled and impossible to import when this build tag is not in use.

Contributing

Information about contributing to this project.

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

License

Apache License 2.0

SPDX-License-Identifier: Apache-2.0

Contact