Download Latest Version v0.25.0.zip (906.4 kB)
Email in envelope

Get an email when there's a new version of Bazel Container Image Rules

Home / v0.22.0
Name Modified Size InfoDownloads / Week
Parent folder
rules_docker-v0.22.0.tar.gz 2021-12-06 593.8 kB
README.md 2021-12-06 4.2 kB
Various updates _ fixes.tar.gz 2021-12-06 593.8 kB
Various updates _ fixes.zip 2021-12-06 895.7 kB
Totals: 4 Items   2.1 MB 0

Copy the following into your WORKSPACE file to use rules_docker at release v0.22.0

http_archive(
    name = "io_bazel_rules_docker",
    sha256 = "59536e6ae64359b716ba9c46c39183403b01eabfbd57578e84398b4829ca499a",
    strip_prefix = "rules_docker-0.22.0",
    urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.22.0/rules_docker-v0.22.0.tar.gz"],
)

BREAKING CHANGES

Previous releases of rules_docker determined when to make non-deterministic, VCS-stamped outputs based on whether a { character appeared in certain attributes. Some rules had a (deprecated) stamp boolean attribute which affected this behavior all builds of that target. This makes it easy to accidentally bust the Bazel cache, for example a test that depends on a container_image might re-run every time because the image's tag changed with each git SHA.

As of this release, you should run bazel build --stamp enable stamped outputs.

To override this on a single target, the stamp attribute on these three rules is now a trinary, just like in other rulesets like rules_python - in place of stamp = False you should use stamp = "@io_bazel_rules_docker//stamp:never" - in place of stamp = True you should use stamp = "@io_bazel_rules_docker//stamp:always" - if no value for stamp attribute is given, the default is based on the --[no]stamp configuration of the build.

For more ideas on using this, see the blog post by the author of the stamping PR: https://blog.aspect.dev/stamping-bazel-builds-with-selective-delivery

What's Changed

New Contributors

Full Changelog: https://github.com/bazelbuild/rules_docker/compare/v0.21.0...v0.22.0

Source: README.md, updated 2021-12-06