diff --git a/contrib/reprobuild/Dockerfile.focal b/contrib/reprobuild/Dockerfile.focal index 0dd8b1d2c..a02e552ce 100644 --- a/contrib/reprobuild/Dockerfile.focal +++ b/contrib/reprobuild/Dockerfile.focal @@ -58,11 +58,12 @@ RUN cd /tmp/ && \ RUN mkdir /build WORKDIR /build -CMD poetry export -o requirements.txt --without-hashes \ +# We mount the repo into `/repo` and then we take a snapshot of it +# first by cloning it. This ensures we're not including any +# uncommitted changes in the working directory on the host. Notice +# that we no longer take the zipfile. +CMD git clone /repo . \ + && poetry export -o requirements.txt --without-hashes \ && pip install -r requirements.txt \ - && mkdir -p /repro \ - && cd /repro \ - && unzip /build/release/*.zip \ - && cd clightning* \ && tools/repro-build.sh \ - && cp *.xz /build/release/ + && cp *.xz /repo/release/ diff --git a/contrib/reprobuild/Dockerfile.jammy b/contrib/reprobuild/Dockerfile.jammy index 024067b2d..6c97db546 100644 --- a/contrib/reprobuild/Dockerfile.jammy +++ b/contrib/reprobuild/Dockerfile.jammy @@ -59,11 +59,12 @@ RUN cd /tmp/ && \ RUN mkdir /build WORKDIR /build -CMD poetry export -o requirements.txt --without-hashes \ +# We mount the repo into `/repo` and then we take a snapshot of it +# first by cloning it. This ensures we're not including any +# uncommitted changes in the working directory on the host. Notice +# that we no longer take the zipfile. +CMD git clone /repo . \ + && poetry export -o requirements.txt --without-hashes \ && pip install -r requirements.txt \ - && mkdir -p /repro \ - && cd /repro \ - && unzip /build/release/*.zip \ - && cd clightning* \ && tools/repro-build.sh \ - && cp *.xz /build/release/ + && cp *.xz /repo/release/