Skip to content

Commit 9c945db

Browse files
cdeckerniftynei
authored andcommitted
reprobuild: Add Rust compiler to repro build docker images
Changelog-Added: build: Reproducible builds now include rust binaries such as the `cln-grpc` plugin
1 parent 8d9c181 commit 9c945db

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

contrib/reprobuild/Dockerfile.bionic

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM bionic
22

33
ENV TZ=UTC
44
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
5+
ENV RUST_PROFILE=release
6+
ENV PATH=/root/.cargo/bin:/root/.pyenv/shims:/root/.pyenv/bin:$PATH
57

68
RUN sed -i '/updates/d' /etc/apt/sources.list && \
79
sed -i '/security/d' /etc/apt/sources.list
@@ -25,7 +27,6 @@ RUN apt-get update \
2527
# Need to fetch a python version that is >= 3.7 since that's the
2628
# lowest version supported by pyln. This is just temporary until we
2729
# drop support for ubuntu 18.04
28-
ENV PATH=/root/.pyenv/shims:/root/.pyenv/bin:$PATH
2930
RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv \
3031
&& apt-get install -y --no-install-recommends \
3132
libbz2-dev \
@@ -41,6 +42,11 @@ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp
4142
&& rm /tmp/get-pip.py \
4243
&& pip install poetry
4344

45+
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
46+
bash rustup-install.sh --default-toolchain none --quiet -y && \
47+
rm rustup-install.sh && \
48+
/root/.cargo/bin/rustup install 1.62
49+
4450
RUN mkdir /build
4551
WORKDIR /build
4652

contrib/reprobuild/Dockerfile.focal

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM focal
22

33
ENV TZ=UTC
44
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
5+
ENV RUST_PROFILE=release
6+
ENV PATH=/root/.cargo/bin:$PATH
57

68
RUN sed -i '/updates/d' /etc/apt/sources.list && \
79
sed -i '/security/d' /etc/apt/sources.list
@@ -29,6 +31,11 @@ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp
2931
&& rm /tmp/get-pip.py \
3032
&& pip install poetry
3133

34+
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
35+
bash rustup-install.sh --default-toolchain none --quiet -y && \
36+
rm rustup-install.sh && \
37+
/root/.cargo/bin/rustup install 1.62
38+
3239
RUN mkdir /build
3340
WORKDIR /build
3441

contrib/reprobuild/Dockerfile.jammy

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ FROM jammy
22

33
ENV TZ=UTC
44
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
5+
ENV RUST_PROFILE=release
6+
ENV PATH=/root/.cargo/bin:$PATH
57

68
RUN sed -i '/updates/d' /etc/apt/sources.list && \
79
sed -i '/security/d' /etc/apt/sources.list
@@ -29,6 +31,11 @@ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp
2931
&& rm /tmp/get-pip.py \
3032
&& pip install poetry
3133

34+
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
35+
bash rustup-install.sh --default-toolchain none --quiet -y && \
36+
rm rustup-install.sh && \
37+
/root/.cargo/bin/rustup install 1.62
38+
3239
RUN mkdir /build
3340
WORKDIR /build
3441

0 commit comments

Comments
 (0)