Rules for building and handling Docker images with Bazel
Copy the following into your WORKSPACE file to use rules_docker at release v0.25.0
http_archive(
name = "io_bazel_rules_docker",
sha256 = "b1e80761a8a8243d03ebca8845e9cc1ba6c82ce7c5179ce2b295cd36f7e394bf",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.25.0/rules_docker-v0.25.0.tar.gz"],
)
container_image
and its implementation function (#2083) by @lbcjbb in https://github.com/bazelbuild/rules_docker/pull/2084
Full Changelog: https://github.com/bazelbuild/rules_docker/compare/v0.24.0...v0.25.0
Copy the following into your WORKSPACE file to use rules_docker at release v0.24.0
http_archive(
name = "io_bazel_rules_docker",
sha256 = "27d53c1d646fc9537a70427ad7b034734d08a9c38924cc6357cc973fed300820",
strip_prefix = "rules_docker-0.24.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.24.0/rules_docker-v0.24.0.tar.gz"],
)
Because of #2042, toolchain_configure
's client_config
becomes a Bazel label instead of an absolute path. Existing applications have to put their config.json
in a Bazel repository, add Bazel rule to export it, and refer it as a label in toolchain_configure
.
Copy the following into your WORKSPACE file to use rules_docker at release v0.23.0
http_archive(
name = "io_bazel_rules_docker",
sha256 = "85ffff62a4c22a74dbd98d05da6cf40f497344b3dbf1e1ab0a37ab2a1a6ca014",
strip_prefix = "rules_docker-0.23.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.23.0/rules_docker-v0.23.0.tar.gz"],
)
Thanks to @uhthomas we now use Bazel Transitions to request dependencies for the docker target platform. See notes in https://github.com/bazelbuild/rules_docker/pull/1963#issuecomment-997122828 about changes that might be required.
WORKSPACE.bazel
files by @UebelAndre in https://github.com/bazelbuild/rules_docker/pull/1992
run_tag
directive. by @psigen in https://github.com/bazelbuild/rules_docker/pull/1995
Full Changelog: https://github.com/bazelbuild/rules_docker/compare/v0.22.0...v0.23.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"],
)
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
stamp = False
you should use stamp = "@io_bazel_rules_docker//stamp:never"
stamp = True
you should use stamp = "@io_bazel_rules_docker//stamp:always"
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
Full Changelog: https://github.com/bazelbuild/rules_docker/compare/v0.21.0...v0.22.0
Copy the following into your WORKSPACE file to use rules_docker at release v0.21.0
http_archive(
name = "io_bazel_rules_docker",
sha256 = "4349f2b0b45c860dd2ffe18802e9f79183806af93ce5921fb12cbd6c07ab69a8",
strip_prefix = "rules_docker-0.21.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.21.0/rules_docker-v0.21.0.tar.gz"],
)
Changes:
Copy the following into your WORKSPACE file to use rules_docker at release v0.20.0
http_archive(
name = "io_bazel_rules_docker",
sha256 = "92779d3445e7bdc79b961030b996cb0c91820ade7ffa7edca69273f404b085d5",
strip_prefix = "rules_docker-0.20.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.20.0/rules_docker-v0.20.0.tar.gz"],
)
Changes:
Copy the following into your WORKSPACE file to use rules_docker at release v0.19.0
http_archive(
name = "io_bazel_rules_docker",
sha256 = "1f4e59843b61981a96835dc4ac377ad4da9f8c334ebe5e0bb3f58f80c09735f4",
strip_prefix = "rules_docker-0.19.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.19.0/rules_docker-v0.19.0.tar.gz"],
)
Copy the following into your WORKSPACE file to use rules_docker at release v0.18.0
http_archive(
name = "io_bazel_rules_docker",
sha256 = "5d31ad261b9582515ff52126bf53b954526547a3e26f6c25a9d64c48a31e45ac",
strip_prefix = "rules_docker-0.18.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.18.0/rules_docker-v0.18.0.tar.gz"],
)
Changes:
master
(#1863)Copy the following into your WORKSPACE file to use rules_docker at release v0.17.0
http_archive(
name = "io_bazel_rules_docker",
sha256 = "59d5b42ac315e7eadffa944e86e90c2990110a1c8075f1cd145f487e999d22b3",
strip_prefix = "rules_docker-0.17.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.17.0/rules_docker-v0.17.0.tar.gz"],
)
Changes:
Update go-containerregsitry dependency to 0.4.1 (#1829)
Fixed some missing digests and addressed other warnings (#1819)
Fixed broken //tests/docker/util:all
tests (#1817)
Update SHA for go-containerregistry (#1815)
Removed bazel_latest
from default dependencies (#1813)
Use actual sha for static:debug image (and update static:latest) (#1804)
make downloading and installing quieter (#1798)
fix the build (#1797)
Revert "Setup assign-size-label action" (#1786)
Introduce github action to mark stale issues/PRs (#1757)
Remove warning about go_image on Mac (#1755)
Add issue and PR templates (#1754)
Revert "Invite maintainers from community (#1750)" (#1753)
Invite maintainers from community (#1750)
Add Domino Data Lab to list of adopters (#1739)
Copy the following into your WORKSPACE file to use rules_docker at release v0.16.0
http_archive(
name = "io_bazel_rules_docker",
sha256 = "95d39fd84ff4474babaf190450ee034d958202043e366b9fc38f438c9e6c3334",
strip_prefix = "rules_docker-0.16.0",
urls = ["https://github.com/bazelbuild/rules_docker/releases/download/v0.16.0/rules_docker-v0.16.0.tar.gz"],
)
Changes: