OCI Reference | cgr.dev/chainguard/bazel |
- View Image in the Chainguard Images Directory.
- View the Image Catalog for a full list of available tags.
- Contact Chainguard for enterprise support, SLAs, and access to older tags.
Bazel - A fast, scalable, multi-language and extensible build system.
Chainguard Images are regularly-updated, minimal container images with low-to-zero CVEs.
This image is available on cgr.dev
:
docker pull cgr.dev/ORGANIZATION/bazel:latest
Be sure to replace the ORGANIZATION
placeholder with the name used for your organization's private repository within the Chainguard registry.
We can use the Bazel examples to try this image.
first clone https://github.com/bazelbuild/examples
git clone [email protected]:bazelbuild/examples.git
change into the Java tutorial directory
cd examples/java-tutorial
now run the chainguard image, mounting the example and overwrite the entrypoint to bash
docker run --rm -ti --entrypoint bash -v ${PWD}:/home/bazel cgr.dev/chainguard/bazel
once in the container you can perform a build
bazel build //:ProjectRunner
and now run the example
bazel-bin/ProjectRunner
and see the message from the example application
Hi
If you have a Zendesk account (typically set up for you by your Customer Success Manager) you can reach out to Chainguard's Customer Success team through our Zendesk portal.
Chainguard Images are a collection of container images designed for security and minimalism.
Many Chainguard Images are distroless; they contain only an open-source application and its runtime dependencies. These images do not even contain a shell or package manager. Chainguard Images are built with Wolfi, our Linux undistro designed to produce container images that meet the requirements of a secure software supply chain.
The main features of Chainguard Images include:
- Minimal design, with no unnecessary software bloat
- Automated nightly builds to ensure Images are completely up-to-date and contain all available security patches
- High quality build-time SBOMs (software bills of materials) attesting the provenance of all artifacts within the Image
- Verifiable signatures provided by Sigstore
- Reproducible builds with Cosign and apko (read more about reproducibility)
As mentioned previously, Chainguard’s distroless Images have no shell or package manager by default. This is great for security, but sometimes you need these things, especially in builder images. For those cases, most (but not all) Chainguard Images come paired with a -dev
variant which does include a shell and package manager.
Although the -dev
image variants have similar security features as their distroless versions, such as complete SBOMs and signatures, they feature additional software that is typically not necessary in production environments. The general recommendation is to use the -dev
variants only to build the application and then copy all application artifacts into a distroless image, which will result in a final container image that has a minimal attack surface and won’t allow package installations or logins.
That being said, it’s worth noting that -dev
variants of Chainguard Images are completely fine to run in production environments. After all, the -dev
variants are still more secure than many popular container images based on fully-featured operating systems such as Debian and Ubuntu since they carry less software, follow a more frequent patch cadence, and offer attestations for what they include.
To better understand how to work with Chainguard Images, we encourage you to visit Chainguard Academy, our documentation and education platform.