diff --git a/core-lightning/alpine/Dockerfile b/core-lightning/alpine/Dockerfile index 66fe9bd..6439714 100644 --- a/core-lightning/alpine/Dockerfile +++ b/core-lightning/alpine/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.22-alpine AS trustedcoin +FROM golang:1.23-alpine AS trustedcoin ARG TRUSTEDCOIN_VERSION=v0.8.2 @@ -58,10 +58,7 @@ RUN make install COPY --from=trustedcoin /go/bin/trustedcoin /usr/local/libexec/c-lightning/plugins/ -FROM alpine:3.19 AS final - -ENV VIRTUAL_ENV=/opt/venv -ENV PATH="$VIRTUAL_ENV/bin:$PATH" +FROM alpine:3.20 AS final COPY --from=builder /usr/local/bin /usr/local/bin COPY --from=builder /usr/local/libexec /usr/local/libexec @@ -70,24 +67,19 @@ RUN apk add --no-cache \ ca-certificates \ libgcc \ libpq \ - py3-pip \ - && python -m venv $VIRTUAL_ENV \ - && pip install -r /usr/local/libexec/c-lightning/plugins/clnrest/requirements.txt \ - && rm -rf /root/.cache \ && addgroup --system cln \ && adduser --system --disabled-password --shell /bin/false --gecos cln --ingroup cln cln \ && mkdir -p /home/cln/.lightning/bitcoin \ && chmod -R 700 /home/cln/.lightning \ && echo "disable-plugin=bcli" >> /home/cln/.lightning/config \ && echo "disable-plugin=wss-proxy" >> /home/cln/.lightning/config \ - && echo "clnrest-port=3010" >> /home/cln/.lightning/config \ - && echo "clnrest-host=0.0.0.0" >> /home/cln/.lightning/config \ + && echo "disable-plugin=clnrest" >> /home/cln/.lightning/config \ && chown -R cln:cln /home/cln/.lightning VOLUME /home/.cln/.lightning/bitcoin USER cln -EXPOSE 3010 9735 +EXPOSE 9735 CMD ["/usr/local/bin/lightningd", "--plugin", "/usr/local/libexec/c-lightning/plugins/trustedcoin"] diff --git a/core-lightning/debian/Dockerfile b/core-lightning/debian/Dockerfile index a95a44c..4d9c364 100644 --- a/core-lightning/debian/Dockerfile +++ b/core-lightning/debian/Dockerfile @@ -1,8 +1,10 @@ -FROM golang:1.22-bookworm AS trustedcoin +FROM golang:1.23-bookworm AS trustedcoin + +ARG TRUSTEDCOIN_VERSION=v0.8.2 ENV CGO_ENABLED=0 -RUN go install -trimpath -ldflags="-d -s -w" github.com/nbd-wtf/trustedcoin@latest +RUN go install -trimpath -ldflags="-d -s -w" github.com/nbd-wtf/trustedcoin@${TRUSTEDCOIN_VERSION} FROM debian:12-slim AS builder @@ -61,9 +63,6 @@ COPY --from=trustedcoin /go/bin/trustedcoin /usr/local/libexec/c-lightning/plugi FROM debian:12-slim AS final -ENV VIRTUAL_ENV=/opt/venv -ENV PATH="$VIRTUAL_ENV/bin:$PATH" - COPY --from=builder /usr/local/bin /usr/local/bin COPY --from=builder /usr/local/libexec /usr/local/libexec @@ -72,26 +71,20 @@ RUN apt-get update \ ca-certificates \ libpq5 \ python-is-python3 \ - python3-pip \ - python3-venv \ && rm -rf /var/lib/apt/lists/* \ - && python -m venv $VIRTUAL_ENV \ - && pip install -r /usr/local/libexec/c-lightning/plugins/clnrest/requirements.txt \ - && rm -rf /root/.cache \ && addgroup --system cln \ && adduser --system --disabled-password --home /home/cln --shell /bin/false --gecos cln --ingroup cln cln \ && mkdir -p /home/cln/.lightning/bitcoin \ && chmod -R 700 /home/cln/.lightning \ && echo "disable-plugin=bcli" >> /home/cln/.lightning/config \ && echo "disable-plugin=wss-proxy" >> /home/cln/.lightning/config \ - && echo "clnrest-port=3010" >> /home/cln/.lightning/config \ - && echo "clnrest-host=0.0.0.0" >> /home/cln/.lightning/config \ + && echo "disable-plugin=clnrest" >> /home/cln/.lightning/config \ && chown -R cln:cln /home/cln/.lightning VOLUME /home/.cln/.lightning/bitcoin USER cln -EXPOSE 3010 9735 +EXPOSE 9735 CMD ["/usr/local/bin/lightningd", "--plugin", "/usr/local/libexec/c-lightning/plugins/trustedcoin"]