Work with containers' images
Go to file
renovate[bot] b85a3c747b
chore(deps): update dependency containers/automation_images to v20230614
Also update Debian image name.

Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: Chris Evich <cevich@redhat.com>
2023-06-14 14:17:03 -04:00
.github Disable dependabot 2023-02-08 14:36:50 -05:00
contrib/cirrus Cirrus: Replace Ubuntu container w/ Debian VM 2023-03-22 10:52:22 -04:00
copy copy: split selection of images to be copied 2023-06-06 18:19:33 +02:00
directory Return private.UploadedBlob from PutBlobWithOptions 2023-03-22 22:31:42 +01:00
docker Inline serverDefault() into the only caller 2023-06-13 02:24:17 +02:00
docs Improve containers-auth.json(5) 2023-05-29 19:35:27 +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 Fix an error message if a digest is not found 2023-06-01 20:16:58 +02:00
manifest Update module github.com/opencontainers/image-spec to v1.1.0-rc3 2023-05-05 01:18:25 +02:00
oci Don't completely silently ignore non-OCI manifests in OCI layouts 2023-04-14 19:49:47 +02:00
openshift Don't specify tls.Config.MinVersion: tls.VersionTLS10 2023-06-13 02:24:17 +02:00
ostree Return private.UploadedBlob from PutBlobWithOptions 2023-03-22 22:31:42 +01:00
pkg Use "fileContents" for *dockerConfigFile values 2023-05-29 19:31:12 +02:00
sif Update module github.com/opencontainers/image-spec to v1.1.0-rc3 2023-05-05 01:18:25 +02:00
signature Merge pull request #1903 from mtrmac/fulcio-issuer-v2 2023-04-01 16:04:42 -04:00
storage Don't use bytes.NewBuffer to construct io.Readers 2023-04-17 23:57:50 +02:00
tarball Don't prefix errors from os.Open with "error opening ...: " 2023-04-18 00:06:51 +02:00
transports Remove duplicate words in comments 2023-02-06 21:22:09 +01:00
types /authentication/credential/g 2023-05-29 19:31:12 +02:00
version Bump to v5.25.1-dev 2023-04-04 22:34:56 +02:00
.cirrus.yml chore(deps): update dependency containers/automation_images to v20230614 2023-06-14 14:17:03 -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 Run codespell on codebase 2023-02-09 09:12:11 -05:00
README.md Don't claim that libostree is required by default. 2023-06-07 22:28:56 +02: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 fix(deps): update module golang.org/x/sync to v0.3.0 2023-06-14 16:59:56 +00:00
go.sum fix(deps): update module golang.org/x/sync to v0.3.0 2023-06-14 16:59:56 +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 also depends on some C libraries. Either install them:

Fedora$ dnf install gpgme-devel libassuan-devel # potentially also 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_docker_daemon_stub: Dont import the docker-daemon: transport in github.com/containers/image/transports/alltransports, to decrease the amount of required dependencies. Use a stub which reports that the transport is not supported instead.
  • 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.
  • containers_image_storage_stub: Dont import the containers-storage: transport in github.com/containers/image/transports/alltransports, to decrease the amount of required dependencies. Use a stub which reports that the transport is not supported instead.

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