mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-20 10:39:49 +01:00
9c945dbc68
Changelog-Added: build: Reproducible builds now include rust binaries such as the `cln-grpc` plugin
65 lines
1.8 KiB
Docker
65 lines
1.8 KiB
Docker
FROM bionic
|
|
|
|
ENV TZ=UTC
|
|
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 && \
|
|
sed -i '/security/d' /etc/apt/sources.list
|
|
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends \
|
|
ca-certificates \
|
|
sudo \
|
|
build-essential \
|
|
libsodium23 \
|
|
libpq-dev \
|
|
git \
|
|
file \
|
|
autoconf \
|
|
debianutils \
|
|
gettext \
|
|
zip \
|
|
unzip \
|
|
wget
|
|
|
|
# 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
|
|
# drop support for ubuntu 18.04
|
|
RUN git clone https://github.com/pyenv/pyenv.git /root/.pyenv \
|
|
&& apt-get install -y --no-install-recommends \
|
|
libbz2-dev \
|
|
libffi-dev \
|
|
libreadline-dev \
|
|
libsqlite3-dev \
|
|
libssl-dev \
|
|
zlib1g-dev \
|
|
&& pyenv install 3.7.0 \
|
|
&& pyenv global 3.7.0
|
|
|
|
RUN wget https://bootstrap.pypa.io/get-pip.py -O /tmp/get-pip.py && python3 /tmp/get-pip.py \
|
|
&& rm /tmp/get-pip.py \
|
|
&& 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
|
|
WORKDIR /build
|
|
|
|
CMD git clone /repo /build \
|
|
&& poetry export -o requirements.txt --without-hashes \
|
|
&& pip install -r requirements.txt\
|
|
&& tools/build-release.sh zipfile \
|
|
&& mkdir -p /repro \
|
|
&& cd /repro \
|
|
&& unzip /build/release/*.zip \
|
|
&& cd clightning* \
|
|
&& tools/repro-build.sh \
|
|
&& cp *.xz /build/release/* /repo/release/ \
|
|
&& cd /repo/release \
|
|
&& sha256sum *
|