mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-07 08:04:23 +01:00
reprobuild: use pyenv for python installation
python-setuptools installation was flakey on some systems. Installing with pyenv should provide a more reproducible build. Changelog-None
This commit is contained in:
@@ -3,7 +3,7 @@ FROM focal
|
||||
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:$PATH
|
||||
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 && \
|
||||
@@ -22,12 +22,23 @@ RUN apt-get update \
|
||||
libsodium23 \
|
||||
libtool \
|
||||
m4 \
|
||||
python3-setuptools \
|
||||
sudo \
|
||||
unzip \
|
||||
wget \
|
||||
zip
|
||||
|
||||
# install Python3.8 (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.8.0 && \
|
||||
pyenv global 3.8.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
|
||||
|
||||
@@ -3,7 +3,7 @@ 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/.cargo/bin:$PATH
|
||||
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 && \
|
||||
@@ -23,12 +23,23 @@ RUN apt-get update \
|
||||
libsodium23 \
|
||||
libtool \
|
||||
m4 \
|
||||
python3-setuptools \
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user