mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 01:43:36 +01:00
55 lines
1.4 KiB
Docker
55 lines
1.4 KiB
Docker
FROM alpine:3.16 as builder
|
|
LABEL org.opencontainers.image.authors="Vincenzo Palazzo (@vincenzopalazzo) vincenzopalazzodev@gmail.com"
|
|
|
|
WORKDIR /build
|
|
|
|
RUN apk update && \
|
|
apk add \
|
|
alpine-sdk \
|
|
autoconf \
|
|
automake \
|
|
ca-certificates \
|
|
cargo \
|
|
gettext \
|
|
git \
|
|
libsodium \
|
|
libtool \
|
|
net-tools \
|
|
postgresql-dev \
|
|
linux-headers \
|
|
py3-pip \
|
|
python3 \
|
|
python3-dev \
|
|
sqlite-dev \
|
|
sqlite-static \
|
|
su-exec \
|
|
zlib-dev \
|
|
zlib-static
|
|
|
|
COPY . /source
|
|
|
|
RUN git clone /source /repo --recursive && \
|
|
cd /repo && \
|
|
python3 -m pip install poetry && \
|
|
poetry export --without-hashes --with=dev > requirements.txt && \
|
|
python3 -m pip install -r requirements.txt --ignore-installed --force && \
|
|
./configure --enable-static --prefix=/usr && \
|
|
make -j $(nproc) && \
|
|
make install
|
|
|
|
FROM alpine:3.16 as runner
|
|
|
|
RUN apk update && \
|
|
apk add \
|
|
postgresql \
|
|
bitcoin-cli
|
|
|
|
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"]
|