Manually invalidate image cache in CI
Our objective is to ensure that the build always uses the latest
Dockerfile for a given build, while minimizing rebuilds.
A counter is explicit and can be used to intentionally invalidate
the image cache, even if the the file's content did not change.
The caching performed by `podman build` is not very clever -
it's not shared between repositories, and is easily invalidated
by successive builds with different versions of the Dockerfile.
Garbage collection is not trivial, since there may be multiple
in-flight revisions with different counters.
Ref T506
Fixes T616
Test Plan: CI ;)
Bug: T616, T506
X-Origin-Diff: phab/D373
GitOrigin-RevId: 5bfb8cd8b98175d645c904aee8e45402d0c049c7
diff --git a/build/Dockerfile b/build/Dockerfile
index 5cd6161..e07e60d 100644
--- a/build/Dockerfile
+++ b/build/Dockerfile
@@ -1,3 +1,8 @@
+#
+# The CI only rebuilds this Dockerfile if its hash changes.
+# Do not reference any external files, since modifications to them won't trigger a rebuild.
+#
+
FROM fedora:30
RUN dnf -y upgrade && \