core-lightning/contrib/docker/Dockerfile.alpine
Jon Griffiths 8b4136bad5 build: remove gmp
Core and secp have not used gmp for a very long time now (core disabled
it in 2015).

Signed-off-by: Jon Griffiths <jon_p_griffiths@yahoo.com>
2023-05-24 18:21:43 +09:30

51 lines
1.2 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 \
py3-mako \
python3 \
python3-dev \
sqlite-dev \
sqlite-static \
su-exec \
zlib-dev \
zlib-static
COPY . /source
RUN git clone /source /repo --recursive && \
cd /repo && \
./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"]