Freedom251 › Container Build Tools
rules_img

What rules_img is
rules_img is a free, open-source set of Bazel rules for building standard OCI container images on Linux, macOS, or a self-hosted setup. It supports both Bzlmod and WORKSPACE configurations and builds images without a Docker daemon, with builds described as fully hermetic. Bazel transitions enable multi-platform images, including linux/amd64 and linux/arm64. Layers can be represented as compact streams and reconstructed into full tar files when pushed or loaded. eStargz and SOCI support lazy pulling. Documented registry integrations include Docker Hub, Google Artifact Registry, Amazon ECR, Harbor, and JFrog Artifactory, with feature support varying by registry. Image loading rules support Docker, Podman, and containerd. Remote Build Execution and Content Addressable Storage integrations can push layers from a remote execution cluster to a registry during a build. Signing is configurable but disabled by default, with documented Notation and cosign workflows. The project uses the Apache-2.0 license.
Who it suits
rules_img suits Bazel users building daemonless OCI images across multiple platforms. It is also aimed at organizations using remote execution, registries, and high build volumes.
What it does well
- Builds OCI images without a Docker daemon
- Supports Bzlmod and WORKSPACE
- Enables multi-platform image builds
- Supports eStargz and SOCI lazy pulling
- Loads images into Docker, Podman, and containerd
What to know first
- Registry feature support varies
- Image signing is disabled by default
- Some remote push strategies require special infrastructure
Verdict
rules_img combines hermetic, daemonless OCI builds with multi-platform transitions, compact layers, and registry integrations. Its advanced remote-push strategies and signing workflows require configuration, and registry capabilities differ.
Facts from rules_img's own pages
- Bazel setups
- It supports both Bzlmod and WORKSPACE setups. · github.com, 9 Oct 2026
- Bazel support
- It supports both Bzlmod and WORKSPACE setups. · github.com, 4 Oct 2026
- Builds
- The project describes its builds as hermetic and says they require no Docker daemon. · github.com, 9 Oct 2026
- Container runtimes
- The documentation describes loading images into Docker, containerd, and Podman, among other supported targets. · github.com, 9 Oct 2026
- Image registries
- Its rules can pull base images from and push images to container registries. · github.com, 9 Oct 2026
- Image signing
- Image signing is configurable and disabled by default; the project documents signing plugins and signing workflows. · github.com, 4 Oct 2026
- Intended users
- The project describes its push strategies as designed for organizations with thousands of builds per day. · github.com, 9 Oct 2026
- Layer efficiency
- It can represent layers as compact streams and reconstruct full layer tar files on demand at push or load time. · github.com, 4 Oct 2026
- Lazy pulling
- It supports eStargz and SOCI for lazy pulling container images. · github.com, 9 Oct 2026
- License
- The repository identifies its license as Apache-2.0. · github.com, 4 Oct 2026
- Multi-platform
- It supports multi-platform image builds through Bazel transitions. · github.com, 4 Oct 2026
- Multi-platform images
- It supports multi-platform images through Bazel transitions, with examples for linux/amd64 and linux/arm64. · github.com, 9 Oct 2026
- OCI compatibility
- It builds standard OCI images compatible with container runtimes. · github.com, 9 Oct 2026
- Purpose
- rules_img provides Bazel rules for building OCI container images with performance optimizations. · github.com, 9 Oct 2026
- Push strategy limits
- The CAS push strategy requires a special registry and Bazel remote cache, while the BES strategy requires a self-hosted BES server, a special backend, and a Bazel remote cache. · github.com, 9 Oct 2026
- Registry authentication
- It documents credential helpers, Docker and Podman configuration, Google credentials, and Amazon ECR credentials for registry access. · github.com, 9 Oct 2026
- Registry integrations
- It documents integration with Docker Hub, Google Artifact Registry, Amazon ECR, Harbor, and JFrog Artifactory, with feature support varying by registry. · github.com, 4 Oct 2026
- Remote builds
- It integrates with Remote Build Execution and Content Addressable Storage, and can push layers from the remote execution cluster to a registry at build time. · github.com, 4 Oct 2026
- Remote execution
- The project describes integration with Remote Build Execution and Content Addressable Storage. · github.com, 9 Oct 2026
- Security
- The project is published under the Apache-2.0 license and documents image signing with pluggable signer plugins including Notation and cosign. · github.com, 9 Oct 2026
- Support and contributions
- The repository invites external contributions and links to its contributing guide. · github.com, 9 Oct 2026
Where rules_img stands on Freedom251
- Container Build Tools#28 of 34