docker: Use git clone as the build basis for reprobuilds

We used to use the zip archive, which comes with some baggage,
especially for some of the submodule-based dependencies. Using `git
clone` ensures that we have a clean snapshot, based on the latest
commit, and we can skip some of the wildcard operations on zip files.

Changelog-None
This commit is contained in:
Christian Decker 2023-12-16 13:50:15 +01:00 committed by Vincenzo Palazzo
parent 5af9d19e94
commit d30a2c9b68
2 changed files with 14 additions and 12 deletions

View file

@ -58,11 +58,12 @@ RUN cd /tmp/ && \
RUN mkdir /build RUN mkdir /build
WORKDIR /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 \ && pip install -r requirements.txt \
&& mkdir -p /repro \
&& cd /repro \
&& unzip /build/release/*.zip \
&& cd clightning* \
&& tools/repro-build.sh \ && tools/repro-build.sh \
&& cp *.xz /build/release/ && cp *.xz /repo/release/

View file

@ -59,11 +59,12 @@ RUN cd /tmp/ && \
RUN mkdir /build RUN mkdir /build
WORKDIR /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 \ && pip install -r requirements.txt \
&& mkdir -p /repro \
&& cd /repro \
&& unzip /build/release/*.zip \
&& cd clightning* \
&& tools/repro-build.sh \ && tools/repro-build.sh \
&& cp *.xz /build/release/ && cp *.xz /repo/release/