Skip to content

Commit d2dae46

Browse files
committed
docker: Fix the dockerfile
Turns out that we were once again mixing non-venv and venv python, so let's go full venv. Changelog-None
1 parent 9481fb8 commit d2dae46

File tree

1 file changed

+33
-22
lines changed

1 file changed

+33
-22
lines changed

Dockerfile

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -71,26 +71,28 @@ RUN apt-get update -qq && \
7171
wget
7272

7373
RUN wget -q https://zlib.net/zlib-1.2.13.tar.gz \
74-
&& tar xvf zlib-1.2.13.tar.gz \
75-
&& cd zlib-1.2.13 \
76-
&& ./configure \
77-
&& make \
78-
&& make install && cd .. && rm zlib-1.2.13.tar.gz && rm -rf zlib-1.2.13
74+
&& tar xvf zlib-1.2.13.tar.gz \
75+
&& cd zlib-1.2.13 \
76+
&& ./configure \
77+
&& make \
78+
&& make install && cd .. && \
79+
rm zlib-1.2.13.tar.gz && \
80+
rm -rf zlib-1.2.13
7981

8082
RUN apt-get install -y --no-install-recommends unzip tclsh \
81-
&& wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip \
82-
&& unzip sqlite-src-3290000.zip \
83-
&& cd sqlite-src-3290000 \
84-
&& ./configure --enable-static --disable-readline --disable-threadsafe --disable-load-extension \
85-
&& make \
86-
&& make install && cd .. && rm sqlite-src-3290000.zip && rm -rf sqlite-src-3290000
83+
&& wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip \
84+
&& unzip sqlite-src-3290000.zip \
85+
&& cd sqlite-src-3290000 \
86+
&& ./configure --enable-static --disable-readline --disable-threadsafe --disable-load-extension \
87+
&& make \
88+
&& make install && cd .. && rm sqlite-src-3290000.zip && rm -rf sqlite-src-3290000
8789

8890
RUN wget -q https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz \
89-
&& tar xvf gmp-6.1.2.tar.xz \
90-
&& cd gmp-6.1.2 \
91-
&& ./configure --disable-assembly \
92-
&& make \
93-
&& make install && cd .. && rm gmp-6.1.2.tar.xz && rm -rf gmp-6.1.2
91+
&& tar xvf gmp-6.1.2.tar.xz \
92+
&& cd gmp-6.1.2 \
93+
&& ./configure --disable-assembly \
94+
&& make \
95+
&& make install && cd .. && rm gmp-6.1.2.tar.xz && rm -rf gmp-6.1.2
9496

9597
ENV RUST_PROFILE=release
9698
ENV PATH=$PATH:/root/.cargo/bin/
@@ -101,21 +103,30 @@ WORKDIR /opt/lightningd
101103
COPY . /tmp/lightning
102104
RUN git clone --recursive /tmp/lightning . && \
103105
git checkout $(git --work-tree=/tmp/lightning --git-dir=/tmp/lightning/.git rev-parse HEAD)
104-
ARG DEVELOPER=0
106+
107+
ARG DEVELOPER=1
105108
ENV PYTHON_VERSION=3
106-
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | python3 - \
109+
RUN curl -sSL https://install.python-poetry.org | python3 - \
107110
&& pip3 install -U pip \
108111
&& pip3 install -U wheel \
109-
&& /root/.local/bin/poetry config virtualenvs.create false \
110112
&& /root/.local/bin/poetry install
111113

112-
RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVELOPER=${DEVELOPER} && make install
114+
RUN ./configure --prefix=/tmp/lightning_install --enable-static && \
115+
make DEVELOPER=${DEVELOPER} && \
116+
/root/.local/bin/poetry run make install
113117

114118
FROM debian:bullseye-slim as final
115119

116120
COPY --from=downloader /opt/tini /usr/bin/tini
117-
RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools python3 python3-pip libpq5\
118-
&& rm -rf /var/lib/apt/lists/*
121+
122+
RUN apt-get update && \
123+
apt-get install -y --no-install-recommends \
124+
socat \
125+
inotify-tools \
126+
python3 \
127+
python3-pip \
128+
libpq5 && \
129+
rm -rf /var/lib/apt/lists/*
119130

120131
ENV LIGHTNINGD_DATA=/root/.lightning
121132
ENV LIGHTNINGD_RPC_PORT=9835

0 commit comments

Comments
 (0)