This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 693
How to create deterministic layers? #2180
Comments
Curiously, this seems to work: container_image(
name = "image",
base = "@dotnet_runtime_deps_6_0_10//image",
layers = [
- ":install_git",
],
+ tars = [
+ ":install_git",
+ ],
) |
Also strange is that the hash on GitHub CI and my machine differ. |
You call tools in your container which aren't hermetic, like |
There are commands to clean up the noise from |
This fix also seems to improve remote cacheability, and may help solve #2195. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
🐞 bug report
Affected Rule
The issue is caused by the rule:container_run_and_commit_layer
container_image
(maybe)Is this a regression?
Unsure
Description
When building a
container_run_and_commit_layer
target multiple times, the hash is not deterministic.However,
container-diff
shows no differences at a file-level.🔬 Minimal Reproduction
https://github.com/njlr/bazel-run-commit
WORKSPACE
BUILD.bazel
test.sh
🔥 Exception or Error
N/A
🌍 Your Environment
Operating System:
Output of
bazel version
:Rules_docker version:
Anything else relevant?
Nope
The text was updated successfully, but these errors were encountered: