Ever tried to programmatically work with container images and ended up wrestling with Docker’s CLI output parsing or registry API quirks? Google’s go-containerregistry solves this by providing clean Go interfaces that abstract away whether your image lives in a registry, tarball, or local Docker daemon. You write code once against their Image interface, and it works everywhere.

The library’s killer feature is its functional mutation approach - instead of modifying images in place, you compose transformations that produce new immutable views. Need to add a layer, change config, or copy between registries? Chain operations together without worrying about corrupting your source. It handles optimization automatically, like streaming compressed data directly from disk to registry without unnecessary decompression cycles. The included CLI tools (crane, gcrane) are production-ready for CI/CD pipelines.

This isn’t just another Docker wrapper - it’s the foundation that powers tools across the container ecosystem. With 3,750+ stars and Google’s backing, it’s becoming the de facto standard for container tooling in Go. The documentation is excellent, and you’ll be copying images between registries in 10 lines of code.


Stars: 3750
💻 Language: Go
🔗 Repository: google/go-containerregistry