No description
  • Go 99%
  • Shell 0.5%
  • C 0.4%
  • Makefile 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Miloslav Trmač df7e80d2d1
Merge pull request #2945 from jankaluza/deprecate
Auto-close new issues.
2025-08-29 18:09:24 +02:00
.github Auto-close new issues. 2025-08-27 13:59:34 +02:00
contrib/cirrus Restrict the root-only tests to ./storage 2025-07-07 19:12:23 +02:00
copy Queue a partially-pulled layer for commit immediately after staging it 2025-06-02 19:34:36 +02:00
directory Add private.ImageDestination.NoteOriginalOCIConfig 2024-11-28 19:34:59 +01:00
docker Losen the dependency on go-connections/tlsconfig 2025-08-07 21:53:21 +02:00
docs INCOMPATIBLE: Remove the implementation of the ostree transport 2025-05-31 01:28:07 +02:00
hack Stop setting GO111MODULE=on 2024-03-26 17:57:52 +01:00
image Document the digest verification promises of UnparsedInstance. 2025-04-02 21:44:54 +02:00
internal Queue a partially-pulled layer for commit immediately after staging it 2025-06-02 19:34:36 +02:00
manifest Use slices.Backward and append instead of manually indexing 2025-03-12 20:17:35 +01:00
oci Losen the dependency on go-connections/tlsconfig 2025-08-07 21:53:21 +02:00
openshift Fix "QF1001: could apply De Morgan's law" 2025-03-26 20:17:47 +01:00
pkg Use github.com/docker/cli/cli/config/configfile.DockerEnvConfigKey 2025-07-10 00:04:09 +02:00
sif fix: handle error on Close() of writable objects 2025-02-28 20:20:50 +00:00
signature rekor: do not cancel http context 2025-08-25 17:33:32 +02:00
storage Queue a partially-pulled layer for commit immediately after staging it 2025-06-02 19:34:36 +02:00
tarball Handle non-gzip compression 2025-03-26 19:55:01 +01:00
transports INCOMPATIBLE: Remove the implementation of the ostree transport 2025-05-31 01:28:07 +02:00
types INCOMPATIBLE: Remove the implementation of the ostree transport 2025-05-31 01:28:07 +02:00
version Bump to v5.37.0-dev 2025-07-14 16:07:18 -04:00
.cirrus.yml Test containers_image_sequoia in CI 2025-08-25 13:47:25 +02:00
.codespellrc .codespellrc: exclude directories with test data 2025-03-04 12:37:04 -08:00
.gitignore Issue #475 Add flag for image compress layer for oci destination 2018-07-12 17:50:17 +05:30
.golangci.yml chore(deps): update dependency golangci/golangci-lint to v2 2025-03-26 20:17:59 +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 Add link to c/common contributor's guide 2025-03-17 11:26:54 +01:00
default-policy.json Moving policy.json and default.yaml from containers/skopeo 2023-12-10 04:46:35 +05:30
default.yaml Moving policy.json and default.yaml from containers/skopeo 2023-12-10 04:46:35 +05:30
doc.go Reformat with Go 1.19's gofmt 2022-08-10 20:38:52 +02:00
go.mod Move the repository to monorepo. 2025-08-25 16:54:30 +02:00
go.sum Update module github.com/ulikunitz/xz to v0.5.13 2025-08-20 18:04:28 +00: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 Allow using sequoia in macOS 2025-08-25 13:46:50 +02:00
README.md Merge pull request #2941 from jankaluza/deprecate 2025-08-26 10:13:46 +02:00
registries.conf Use consistent example domains 2023-08-03 00:39:53 +02:00
SECURITY.md Fix docs links due to branch rename 2021-06-10 11:23:41 -04:00

Go Reference Build Status

Warning

This package was moved; please update your references to use go.podman.io/image/v5 instead. New development of this project happens on https://github.com/containers/container-libs. For more information, check https://blog.podman.io/2025/08/upcoming-migration-of-three-containers-repositories-to-monorepo/.

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
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_sequoia: Use Sequoia-PGP for signature verification instead of the default cgo/gpgme-based or the Golang-only OpenPGP implementations, and enable the signature/simplesequoia subpackage. This requires a support shared library installed on the system. Install https://github.com/ueno/podman-sequoia , and potentially update build configuration to point at it (compare SEQUOIA_SONAME_DIR in Makefile).
  • 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