2022-10-13 14:34:46 +02:00
|
|
|
FROM alpine:3.16 as builder
|
2022-01-04 16:39:46 +01:00
|
|
|
LABEL org.opencontainers.image.authors="Vincenzo Palazzo (@vincenzopalazzo) vincenzopalazzodev@gmail.com"
|
|
|
|
|
|
|
|
WORKDIR /build
|
|
|
|
|
|
|
|
RUN apk update && \
|
2022-10-10 20:12:41 +02:00
|
|
|
apk add \
|
|
|
|
alpine-sdk \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
ca-certificates \
|
2022-10-13 14:34:46 +02:00
|
|
|
cargo \
|
2022-10-10 20:12:41 +02:00
|
|
|
gettext \
|
|
|
|
git \
|
|
|
|
libsodium \
|
|
|
|
libtool \
|
|
|
|
net-tools \
|
2022-10-13 14:34:46 +02:00
|
|
|
postgresql-dev \
|
2024-02-05 11:13:33 +01:00
|
|
|
linux-headers \
|
|
|
|
py3-pip \
|
2022-10-10 20:12:41 +02:00
|
|
|
python3 \
|
2022-10-13 14:34:46 +02:00
|
|
|
python3-dev \
|
2022-10-10 20:12:41 +02:00
|
|
|
sqlite-dev \
|
2022-10-13 14:34:46 +02:00
|
|
|
sqlite-static \
|
2022-10-10 20:12:41 +02:00
|
|
|
su-exec \
|
2022-10-13 14:34:46 +02:00
|
|
|
zlib-dev \
|
|
|
|
zlib-static
|
2022-01-04 16:39:46 +01:00
|
|
|
|
2022-10-13 14:35:16 +02:00
|
|
|
COPY . /source
|
2022-01-04 16:39:46 +01:00
|
|
|
|
2022-10-13 14:35:16 +02:00
|
|
|
RUN git clone /source /repo --recursive && \
|
|
|
|
cd /repo && \
|
2024-02-05 11:13:33 +01:00
|
|
|
python3 -m pip install poetry && \
|
|
|
|
poetry export --without-hashes --with=dev > requirements.txt && \
|
|
|
|
python3 -m pip install -r requirements.txt --ignore-installed --force && \
|
2022-10-13 14:35:16 +02:00
|
|
|
./configure --enable-static --prefix=/usr && \
|
|
|
|
make -j $(nproc) && \
|
2022-01-04 16:39:46 +01:00
|
|
|
make install
|
|
|
|
|
2022-10-13 14:36:10 +02:00
|
|
|
FROM alpine:3.16 as runner
|
|
|
|
|
2022-10-13 14:50:26 +02:00
|
|
|
RUN apk update && \
|
|
|
|
apk add \
|
|
|
|
postgresql \
|
|
|
|
bitcoin-cli
|
|
|
|
|
2022-10-13 14:36:10 +02:00
|
|
|
COPY --from=builder /usr/bin/lightningd /usr/bin/
|
|
|
|
COPY --from=builder /usr/bin/lightning-cli /usr/bin/
|
|
|
|
COPY --from=builder /usr/bin/lightning-hsmtool /usr/bin/
|
|
|
|
COPY --from=builder /usr/libexec/c-lightning /usr/libexec/c-lightning
|
|
|
|
COPY --from=builder /usr/share/man/man8 /usr/share/man/man8
|
|
|
|
COPY --from=builder /usr/share/doc/c-lightning /usr/share/doc/c-lightning
|
|
|
|
|
|
|
|
ENTRYPOINT ["/usr/bin/lightningd"]
|