reprobuild: Add Rust compiler to repro build docker images

Changelog-Added: build: Reproducible builds now include rust binaries such as the `cln-grpc` plugin
This commit is contained in:
Christian Decker 2022-07-13 12:26:16 +02:00 committed by neil saitug
parent 8d9c181e3b
commit 9c945dbc68
3 changed files with 21 additions and 1 deletions

View File

@ -2,6 +2,8 @@ FROM bionic
ENV TZ=UTC ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV RUST_PROFILE=release
ENV PATH=/root/.cargo/bin:/root/.pyenv/shims:/root/.pyenv/bin:$PATH
RUN sed -i '/updates/d' /etc/apt/sources.list && \ RUN sed -i '/updates/d' /etc/apt/sources.list && \
sed -i '/security/d' /etc/apt/sources.list sed -i '/security/d' /etc/apt/sources.list
@ -25,7 +27,6 @@ RUN apt-get update \
# Need to fetch a python version that is >= 3.7 since that's the # Need to fetch a python version that is >= 3.7 since that's the
# lowest version supported by pyln. This is just temporary until we # lowest version supported by pyln. This is just temporary until we
# drop support for ubuntu 18.04 # drop support for ubuntu 18.04
ENV PATH=/root/.pyenv/shims:/root/.pyenv/bin:$PATH
RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv \ RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends \
libbz2-dev \ libbz2-dev \
@ -41,6 +42,11 @@ RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp
&& rm /tmp/get-pip.py \ && rm /tmp/get-pip.py \
&& pip install poetry && pip install poetry
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
bash rustup-install.sh --default-toolchain none --quiet -y && \
rm rustup-install.sh && \
/root/.cargo/bin/rustup install 1.62
RUN mkdir /build RUN mkdir /build
WORKDIR /build WORKDIR /build

View File

@ -2,6 +2,8 @@ FROM focal
ENV TZ=UTC ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV RUST_PROFILE=release
ENV PATH=/root/.cargo/bin:$PATH
RUN sed -i '/updates/d' /etc/apt/sources.list && \ RUN sed -i '/updates/d' /etc/apt/sources.list && \
sed -i '/security/d' /etc/apt/sources.list 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
&& rm /tmp/get-pip.py \ && rm /tmp/get-pip.py \
&& pip install poetry && pip install poetry
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
bash rustup-install.sh --default-toolchain none --quiet -y && \
rm rustup-install.sh && \
/root/.cargo/bin/rustup install 1.62
RUN mkdir /build RUN mkdir /build
WORKDIR /build WORKDIR /build

View File

@ -2,6 +2,8 @@ FROM jammy
ENV TZ=UTC ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
ENV RUST_PROFILE=release
ENV PATH=/root/.cargo/bin:$PATH
RUN sed -i '/updates/d' /etc/apt/sources.list && \ RUN sed -i '/updates/d' /etc/apt/sources.list && \
sed -i '/security/d' /etc/apt/sources.list 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
&& rm /tmp/get-pip.py \ && rm /tmp/get-pip.py \
&& pip install poetry && pip install poetry
RUN wget https://sh.rustup.rs -O rustup-install.sh && \
bash rustup-install.sh --default-toolchain none --quiet -y && \
rm rustup-install.sh && \
/root/.cargo/bin/rustup install 1.62
RUN mkdir /build RUN mkdir /build
WORKDIR /build WORKDIR /build