|
|
|
@@ -27,10 +27,11 @@ RUN apk update && \
|
|
|
|
zlib-dev \
|
|
|
|
zlib-dev \
|
|
|
|
zlib-static
|
|
|
|
zlib-static
|
|
|
|
|
|
|
|
|
|
|
|
ARG GIT_HASH=bd9494c65be09e6f8ecb3bc49b50a859467a65fe
|
|
|
|
ARG CORE_LIGHTNING_GIT_HASH=bd9494c65be09e6f8ecb3bc49b50a859467a65fe
|
|
|
|
RUN git clone --recursive https://github.com/lightning-signer/c-lightning.git /repo && \
|
|
|
|
ARG CORE_LIGHTNING_REPO=https://github.com/lightning-signer/c-lightning.git
|
|
|
|
|
|
|
|
RUN git clone --recursive $CORE_LIGHTNING_REPO /repo && \
|
|
|
|
cd /repo && \
|
|
|
|
cd /repo && \
|
|
|
|
git checkout $GIT_HASH && \
|
|
|
|
git checkout $CORE_LIGHTNING_GIT_HASH && \
|
|
|
|
./configure --enable-static --prefix=/usr && \
|
|
|
|
./configure --enable-static --prefix=/usr && \
|
|
|
|
make -j $(nproc) && \
|
|
|
|
make -j $(nproc) && \
|
|
|
|
make install
|
|
|
|
make install
|
|
|
|
@@ -44,15 +45,22 @@ RUN apk add \
|
|
|
|
pkgconf \
|
|
|
|
pkgconf \
|
|
|
|
sqlite-dev
|
|
|
|
sqlite-dev
|
|
|
|
|
|
|
|
|
|
|
|
ARG GIT_HASH=4f37007f00f1cf41e2ead031ddc4a34ef8dbd9e5
|
|
|
|
ARG CLBOSS_GIT_HASH=4f37007f00f1cf41e2ead031ddc4a34ef8dbd9e5
|
|
|
|
RUN git clone --recurse-submodules https://github.com/ZmnSCPxj/clboss.git /clboss && \
|
|
|
|
ARG CLBOSS_REPO=https://github.com/ZmnSCPxj/clboss.git
|
|
|
|
|
|
|
|
RUN git clone --recurse-submodules $CLBOSS_REPO /clboss && \
|
|
|
|
cd /clboss && \
|
|
|
|
cd /clboss && \
|
|
|
|
git checkout $GIT_HASH && \
|
|
|
|
git checkout $CLBOSS_GIT_HASH && \
|
|
|
|
autoreconf -i && \
|
|
|
|
autoreconf -i && \
|
|
|
|
./configure --prefix=/usr && \
|
|
|
|
./configure --prefix=/usr && \
|
|
|
|
make -j $(nproc) && \
|
|
|
|
make -j $(nproc) && \
|
|
|
|
make install
|
|
|
|
make install
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ARG PLUGINS_GIT_HASH=ce078bb74e10b5dea779fcd9fbe77e1d3e72db7a
|
|
|
|
|
|
|
|
ARG PLUGINS_REPO=https://github.com/lightningd/plugins.git
|
|
|
|
|
|
|
|
RUN git clone $PLUGINS_REPO && \
|
|
|
|
|
|
|
|
cd plugins && \
|
|
|
|
|
|
|
|
git checkout $PLUGINS_GIT_HASH
|
|
|
|
|
|
|
|
|
|
|
|
# final stage with runtime dependencies and pkgs
|
|
|
|
# final stage with runtime dependencies and pkgs
|
|
|
|
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as runner
|
|
|
|
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as runner
|
|
|
|
|
|
|
|
|
|
|
|
@@ -62,6 +70,7 @@ LABEL maintainer.0="Lakshya Singh (@king-11)" \
|
|
|
|
RUN apk update && \
|
|
|
|
RUN apk update && \
|
|
|
|
apk add \
|
|
|
|
apk add \
|
|
|
|
python3 \
|
|
|
|
python3 \
|
|
|
|
|
|
|
|
py3-pip \
|
|
|
|
postgresql \
|
|
|
|
postgresql \
|
|
|
|
bitcoin-cli \
|
|
|
|
bitcoin-cli \
|
|
|
|
pkgconf \
|
|
|
|
pkgconf \
|
|
|
|
@@ -79,6 +88,8 @@ ENV LIGHTNINGD_DATA=${LIGHTNINGD_HOME}/.lightning \
|
|
|
|
LIGHTNINGD_PORT=9735 \
|
|
|
|
LIGHTNINGD_PORT=9735 \
|
|
|
|
BITCOIND_HOME=/root/.bitcoin
|
|
|
|
BITCOIND_HOME=/root/.bitcoin
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN mkdir -p /usr/local/src/plugins
|
|
|
|
|
|
|
|
|
|
|
|
COPY --from=builder /usr/bin/lightningd /usr/bin/
|
|
|
|
COPY --from=builder /usr/bin/lightningd /usr/bin/
|
|
|
|
COPY --from=builder /usr/bin/lightning-cli /usr/bin/
|
|
|
|
COPY --from=builder /usr/bin/lightning-cli /usr/bin/
|
|
|
|
COPY --from=builder /usr/bin/lightning-hsmtool /usr/bin/
|
|
|
|
COPY --from=builder /usr/bin/lightning-hsmtool /usr/bin/
|
|
|
|
@@ -86,6 +97,7 @@ 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/man/man8 /usr/share/man/man8
|
|
|
|
COPY --from=builder /usr/share/doc/c-lightning /usr/share/doc/c-lightning
|
|
|
|
COPY --from=builder /usr/share/doc/c-lightning /usr/share/doc/c-lightning
|
|
|
|
COPY --from=builder /usr/bin/clboss /usr/bin/clboss
|
|
|
|
COPY --from=builder /usr/bin/clboss /usr/bin/clboss
|
|
|
|
|
|
|
|
COPY --from=builder /build/plugins/summary /usr/local/src/plugins/summary
|
|
|
|
|
|
|
|
|
|
|
|
RUN addgroup -S lightning && adduser -S lightning -G lightning && \
|
|
|
|
RUN addgroup -S lightning && adduser -S lightning -G lightning && \
|
|
|
|
mkdir -p ${LIGHTNINGD_DATA} && \
|
|
|
|
mkdir -p ${LIGHTNINGD_DATA} && \
|
|
|
|
@@ -110,6 +122,11 @@ COPY assets/regtest-config /regtest-config
|
|
|
|
|
|
|
|
|
|
|
|
USER lightning
|
|
|
|
USER lightning
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RUN pip3 install \
|
|
|
|
|
|
|
|
pyln-client \
|
|
|
|
|
|
|
|
requests \
|
|
|
|
|
|
|
|
packaging
|
|
|
|
|
|
|
|
|
|
|
|
HEALTHCHECK --interval=10s --timeout=10s --start-period=15s \
|
|
|
|
HEALTHCHECK --interval=10s --timeout=10s --start-period=15s \
|
|
|
|
CMD ["/bin/sh", "-c", "/healthcheck.sh"]
|
|
|
|
CMD ["/bin/sh", "-c", "/healthcheck.sh"]
|
|
|
|
|
|
|
|
|
|
|
|
|