Skip to content

Commit db48b79

Browse files
author
Claudio Raimondi
committed
Fix strip, Add needed package [skip ci]
1 parent eccdb32 commit db48b79

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

Dockerfile

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
ARG TARGETOS
2+
ARG TARGETARCH
3+
14
ARG BASE_DISTRO="debian:bookworm-slim"
25

36
FROM ${BASE_DISTRO} AS base-downloader
@@ -63,6 +66,7 @@ RUN apt-get update -qq && \
6366
gnupg \
6467
wget \
6568
python3 \
69+
python3-dev \
6670
autoconf \
6771
automake \
6872
libicu-dev \
@@ -195,12 +199,20 @@ RUN mkdir -p .cargo && tee .cargo/config.toml <<-EOF
195199
linker = "${target_host}-gcc"
196200
EOF
197201

202+
ARG POETRY_VIRTUALENVS_CREATE=false
203+
198204
RUN poetry lock && \
199205
poetry install --no-root --no-interaction --no-ansi
200206

201207
RUN ./configure --prefix=/tmp/lightning_install --enable-static
202208
RUN poetry run make install
203209

210+
RUN for f in /tmp/lightning_install/bin/*; do \
211+
if file "$f" | grep -q ELF; then \
212+
${STRIP} --strip-unneeded "$f"; \
213+
fi; \
214+
done
215+
204216
FROM ${BASE_DISTRO} AS final
205217

206218
RUN apt-get update -qq && \
@@ -221,12 +233,6 @@ COPY --from=downloader /opt/litecoin/bin/ /usr/bin/
221233
COPY --from=builder /tmp/lightning_install/ /usr/local/
222234
COPY --from=builder /tmp/postgres_install/lib/ /usr/lib/
223235

224-
RUN for f in /usr/bin/*; do \
225-
if file "$f" | grep -q ELF; then \
226-
strip --strip-unneeded "$f"; \
227-
fi; \
228-
done
229-
230236
COPY tools/docker-entrypoint.sh /entrypoint.sh
231237

232238
#TODO: user creation. user permissions on volume.

0 commit comments

Comments
 (0)