Repository navigation
Using Bzlmod
Add the following to your MODULE.bazel file:
bazel_dep(name = "rules_img", version = "0.3.26")For further instructions, see the README.
Using WORKSPACE
Add the following to your WORKSPACE.bazel file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_img",
sha256 = "1b8ef0bedce532f634b07ed7d38be6f8079afe7e9a5209a20c52621281291c5b",
urls = ["https://github.com/bazel-contrib/rules_img/releases/download/v0.3.26/rules_img-v0.3.26.tar.gz"],
)
# Load dependencies
load("@rules_img//img:dependencies.bzl", "rules_img_dependencies")
rules_img_dependencies()
# Initialize Bazel Features
load("@bazel_features//:deps.bzl", "bazel_features_deps")
# Register prebuilt toolchains
load("@rules_img//img:repositories.bzl", "img_register_prebuilt_toolchains")
img_register_prebuilt_toolchains()
register_toolchains("@img_toolchain//:all")
# Register hermetic launcher toolchains
register_toolchains("@hermetic_launcher//launcher/private/prebuilt:all")
# Example: Pull a base image
load("@rules_img//img:pull.bzl", "pull")
pull(
name = "alpine",
digest = "sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1",
registry = "index.docker.io",
repository = "library/alpine",
tag = "3.22",
)For more examples, see the README.
What's Changed
- deps: bump Bazel rules by @malt3 in #876
- fix(push): accept a registry with a path in cross-mount hints by @kechen-xai in #877
- feat(layer): add empty_dirs to image_layer by @dzbarsky in #881
- feat(pull): accept a label for the registry auth config by @malt3 in #882
- feat(push): pass docker_config_path to build-time pushes by @malt3 in #883
- feat(layer): hardlink runfiles by content regardless of metadata by @malt3 in #884
- prepare 0.3.26 by @malt3 in #885
New Contributors
- @kechen-xai made their first contribution in #877
Full Changelog: v0.3.25...v0.3.26