Skip to content

Avoid build-cache in building the released docker image (update CONTRIBUTING.md file)

Currently the instructions at CONTRIBUTING.md file, say to use command:

docker build -t registry.salsa.debian.org/reproducible-builds/diffoscope .

which will use the build-cache when building the image used as release version (other people will pull this image and use it)

thus debian-sid-image & the packages installed as dependencies might be old (used from cache built in the past)

to fix it use this Change for CONTRIBUTING.md file:

--- CONTRIBUTING.md
+++ CONTRIBUTING.md
@@ -89,5 +89,5 @@
 
 Finally, update the Docker image using:
 
-    $ docker build -t registry.salsa.debian.org/reproducible-builds/diffoscope .
+    $ docker build --force-rm --no-cache --pull -t registry.salsa.debian.org/reproducible-builds/diffoscope .
     $ docker push registry.salsa.debian.org/reproducible-builds/diffoscope

which add the below params to ensure the image built using latest dependencies:

--force-rm (Always remove intermediate containers, it means even if the build failed instead of the default --rm which remove intermediate containers only after successful build)

--no-cache (Do not use cache when building the image)

--pull (Always attempt to pull a newer version of the image)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information