mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 22:45:27 +01:00
Core and secp have not used gmp for a very long time now (core disabled it in 2015). Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
74 lines
2.1 KiB
Text
74 lines
2.1 KiB
Text
FROM jammy
|
|
|
|
ENV TZ=UTC
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
ENV RUST_PROFILE=release
|
|
ENV PATH=/root/.pyenv/shims:/root/.pyenv/bin:/root/.cargo/bin:$PATH
|
|
ENV PROTOC_VERSION=22.0
|
|
|
|
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 \
|
|
autoconf \
|
|
build-essential \
|
|
ca-certificates \
|
|
file \
|
|
gettext \
|
|
git \
|
|
libsqlite3-dev \
|
|
libpq-dev \
|
|
libsodium23 \
|
|
libtool \
|
|
m4 \
|
|
sudo \
|
|
unzip \
|
|
wget \
|
|
zip
|
|
|
|
# Install Python3.10 (more reproducible than relying on python3-setuptools)
|
|
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.10.0 && \
|
|
pyenv global 3.10.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
|
|
|
|
# Download protoc manually, it is in the update repos which we
|
|
# disabled above, so `apt-get` can't find it anymore.
|
|
RUN cd /tmp/ && \
|
|
wget https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
|
|
unzip protoc-${PROTOC_VERSION}-linux-x86_64.zip && \
|
|
mv bin/protoc /usr/local/bin && \
|
|
rm -rf include bin protoc-${PROTOC_VERSION}-linux-x86_64.zip
|
|
|
|
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 \
|
|
&& mkdir -p /repo/release \
|
|
&& cp *.xz /build/release/* /repo/release/ \
|
|
&& cd /repo/release/ \
|
|
&& sha256sum *
|