v0.4.0
Pre-release
Pre-release
Using Bzlmod with Bazel 6
- Enable with
common --enable_bzlmod
in.bazelrc
. - Add to your
MODULE.bazel
file:
bazel_dep(name = "rules_distroless", version = "0.4.0")
Using WORKSPACE
Paste this snippet into your file:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_distroless",
sha256 = "05c60ab38d1ab3456d30892256b7cc55059933ba1bbe5b2be4fb232788e107fd",
strip_prefix = "rules_distroless-0.4.0",
url = "https://github.com/GoogleContainerTools/rules_distroless/releases/download/v0.4.0/rules_distroless-v0.4.0.tar.gz",
)
######################
# rules_distroless setup #
######################
# Fetches the rules_distroless dependencies.
# If you want to have a different version of some dependency,
# you should fetch it *before* calling this.
# Alternatively, you can skip calling this function, so long as you've
# already fetched all the dependencies.
load("@rules_distroless//distroless:dependencies.bzl", "distroless_dependencies")
distroless_dependencies()
load("@rules_distroless//distroless:toolchains.bzl", "distroless_register_toolchains")
distroless_register_toolchains()
load("@rules_distroless//apt:apt.bzl", "apt")
# bazel run @bullseye//:lock
apt.install(
name = "bullseye",
lock = "@@//:bullseye.lock.json",
manifest = "//:bullseye.yaml",
)
load("@bullseye//:packages.bzl", "bullseye_packages")
bullseye_packages()
apt.install(
name = "bullseye_nolock",
manifest = "//:bullseye.yaml",
nolock = True,
)
load("@bullseye_nolock//:packages.bzl", "bullseye_nolock_packages")
bullseye_nolock_packages()
What's Changed
- feat: add convience targets by @thesayyn in #115
- fix: apt_deb_repository bzl_library missing dep by @jjmaestro in #117
- fix: only test against 7.x and 8.x by @thesayyn in #118
Full Changelog: v0.3.9...v0.4.0