A Go library and CLI tools for interacting with container registries, providing immutable views and functional mutations of images and layers.
go-containerregistry is a Go library and collection of CLI tools for working with container registries. It provides interfaces and utilities for reading, writing, and manipulating container images and layers across various storage backends like remote registries, tarballs, and Docker daemons. The library solves the problem of building efficient and composable container tooling by offering immutable views of resources and functional mutations.
Go developers and DevOps engineers who need to build custom tools for interacting with container registries, automate image manipulation, or integrate container operations into their applications. It's also useful for those creating CI/CD pipelines or Kubernetes-related tooling.
Developers choose go-containerregistry for its clean, immutable interface design, performance optimizations for common paths, and comprehensive support for various container storage formats. Its composable primitives and included CLI tools like `crane` provide a powerful foundation for building custom container workflows without reinventing the wheel.
Go library and CLIs for working with container registries
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Defines interfaces like Image and Layer as immutable views, ensuring thread-safe and consistent operations, which is central to the library's philosophy for reliable container tooling.
Supports multiple backends including remote registries, tarballs, Docker daemons, and OCI layouts, as listed in the README under v1.Image sources and sinks, enabling flexible image handling.
The mutate package allows creating new immutable images after changes, facilitating efficient transformations without side effects, which is optimized for common tooling patterns.
Includes crane, gcrane, and krane for common registry interactions, reducing development effort for standard tasks like image copying and Kubernetes-aware authentication.
The README admits that Image and Layer interfaces are 'pretty wide' and painful to implement from scratch, requiring the partial package as a helper, which adds complexity for custom integrations.
As a Go-specific library, it cannot be used directly in projects written in other languages, limiting its applicability for cross-platform or polyglot development environments.
Features like estargz support are under experimental environment variables and marked as deprecated, indicating potential instability and breaking changes in future releases.