mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-09 08:04:19 +01:00
docker: Use system libraries, don't bring your own
We were compiling them from source, but then not adding them in the final docker image. This just drops the source based ones in favor of system provided ones. Fixes #3074
This commit is contained in:
committed by
Rusty Russell
parent
07e6f43e1d
commit
48728d3828
50
Dockerfile
50
Dockerfile
@@ -48,29 +48,26 @@ RUN mkdir /opt/litecoin && cd /opt/litecoin \
|
||||
FROM debian:stretch-slim as builder
|
||||
|
||||
ENV LIGHTNINGD_VERSION=master
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates autoconf automake build-essential git libtool python python3 python3-mako wget gnupg dirmngr git gettext
|
||||
|
||||
RUN wget -q https://zlib.net/zlib-1.2.11.tar.gz \
|
||||
&& tar xvf zlib-1.2.11.tar.gz \
|
||||
&& cd zlib-1.2.11 \
|
||||
&& ./configure \
|
||||
&& make \
|
||||
&& make install && cd .. && rm zlib-1.2.11.tar.gz && rm -rf zlib-1.2.11
|
||||
|
||||
RUN apt-get install -y --no-install-recommends unzip tclsh \
|
||||
&& wget -q https://www.sqlite.org/2018/sqlite-src-3260000.zip \
|
||||
&& unzip sqlite-src-3260000.zip \
|
||||
&& cd sqlite-src-3260000 \
|
||||
&& ./configure --enable-static --disable-readline --disable-threadsafe --disable-load-extension \
|
||||
&& make \
|
||||
&& make install && cd .. && rm sqlite-src-3260000.zip && rm -rf sqlite-src-3260000
|
||||
|
||||
RUN wget -q https://gmplib.org/download/gmp/gmp-6.1.2.tar.xz \
|
||||
&& tar xvf gmp-6.1.2.tar.xz \
|
||||
&& cd gmp-6.1.2 \
|
||||
&& ./configure --disable-assembly \
|
||||
&& make \
|
||||
&& make install && cd .. && rm gmp-6.1.2.tar.xz && rm -rf gmp-6.1.2
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
autoconf \
|
||||
automake \
|
||||
build-essential \
|
||||
git \
|
||||
libtool \
|
||||
python \
|
||||
python3 \
|
||||
python3-mako \
|
||||
wget \
|
||||
gnupg \
|
||||
dirmngr \
|
||||
git \
|
||||
gettext \
|
||||
unzip \
|
||||
tclsh \
|
||||
libsqlite3-dev \
|
||||
libgmp-dev \
|
||||
zlib1g-dev
|
||||
|
||||
WORKDIR /opt/lightningd
|
||||
COPY . /tmp/lightning
|
||||
@@ -82,7 +79,12 @@ RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVE
|
||||
|
||||
FROM debian:stretch-slim as final
|
||||
COPY --from=downloader /opt/tini /usr/bin/tini
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
socat \
|
||||
inotify-tools \
|
||||
libgmp10 \
|
||||
libsqlite3-0 \
|
||||
zlib1g \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENV LIGHTNINGD_DATA=/root/.lightning
|
||||
|
||||
Reference in New Issue
Block a user