Work with containers' images
Go to file
Tomas Volf 58f840462c
Document limitations of transports for remote podman client
When using remote podman client, not all transports work as expected. So
document this limitation.

Fixes: containers/podman#15141
Signed-off-by: Tomas Volf <tomas.volf@showmax.com>
2022-08-30 10:50:46 +02:00
.github Upgrade to GitHub-native Dependabot 2021-05-01 07:18:32 -04:00
contrib/cirrus Cirrus: Update to F36 VMs 2022-04-29 14:29:16 -04:00
copy Use c/image's reference package 2022-08-15 15:36:14 +02:00
directory Switch to golang native error wrapping 2022-07-13 16:50:50 +02:00
docker Automaticaly delete a docker-archive if we didn't write a complete image 2022-08-23 20:54:39 +02:00
docs Document limitations of transports for remote podman client 2022-08-30 10:50:46 +02:00
hack build(deps): bump github.com/containers/storage from 1.33.1 to 1.33.2 2021-08-09 16:48:13 +02:00
image Move c/image/image to c/image/internal/image 2022-06-11 01:25:43 +02:00
internal Merge pull request #1626 from ningmingxiao/dev3 2022-08-19 01:08:17 +02:00
manifest enhance inspect 2022-08-09 13:01:48 +08:00
oci Switch to golang native error wrapping 2022-07-13 16:50:50 +02:00
openshift Reformat with Go 1.19's gofmt 2022-08-10 20:38:52 +02:00
ostree Switch to golang native error wrapping 2022-07-13 16:50:50 +02:00
pkg Reformat with Go 1.19's gofmt 2022-08-10 20:38:52 +02:00
sif Reformat with Go 1.19's gofmt 2022-08-10 20:38:52 +02:00
signature Reformat with Go 1.19's gofmt 2022-08-10 20:38:52 +02:00
storage Switch to golang native error wrapping 2022-07-13 16:50:50 +02:00
tarball Reformat with Go 1.19's gofmt 2022-08-10 20:38:52 +02:00
transports Remove uses of errors.Errorf 2022-06-30 21:45:07 +02:00
types Run gofmt 2022-08-19 01:16:37 +02:00
version Bump to v5.22.1-dev 2022-07-21 20:50:55 +02:00
.cirrus.Dockerfile Cirrus: Migrate from Travis CI 2021-03-11 11:20:18 +01:00
.cirrus.yml Cirrus: Update CI VM images 2022-07-29 14:14:47 -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 Update golangci-lint to 1.47.2 2022-07-29 14:14:47 -04:00
README.md Change all references to docker registry to container registry 2021-06-30 15:34:06 -04:00
SECURITY.md Fix docs links due to branch rename 2021-06-10 11:23:41 -04:00
doc.go Reformat with Go 1.19's gofmt 2022-08-10 20:38:52 +02:00
go.mod build(deps): bump github.com/vbauerster/mpb/v7 from 7.4.2 to 7.5.2 2022-08-26 17:25:58 +00:00
go.sum build(deps): bump github.com/vbauerster/mpb/v7 from 7.4.2 to 7.5.2 2022-08-26 17:25:58 +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 docker.io and quay.io registries. 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