diff --git a/README.md b/README.md index 11878eb4b..17f54e5f9 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ The macOS builds are not notarized and the Windows installers are not Authentico xattr -dr com.apple.quarantine "/Applications/Polar BLAKE2b.app" ``` -The node images are built by the `Images` workflow from the Dockerfiles in [docker](docker), each pinned to a signed checksum file or, for LND, a source commit, as listed in [docker/README.md](docker/README.md). +The node images are built by the `Images` workflow from the Dockerfiles in [docker](docker), Bitcoin Knots is pinned to its signed checksum file, LND to a source commit, and Core Lightning builds on the `lightningd` image privkeyio/lightning publishes for each release; see [docker/README.md](docker/README.md). ## Reporting issues diff --git a/docker/README.md b/docker/README.md index a906a63ee..6134810de 100644 --- a/docker/README.md +++ b/docker/README.md @@ -57,10 +57,10 @@ Replace `` with a tag of [paulscode/lightning-fork](https://github.com/ ```sh $ cd clightning -$ docker buildx build --platform linux/amd64,linux/arm64 --build-arg CLN_VERSION= --build-arg CLN_SHA256SUMS= --build-arg BITCOIN_VERSION= --build-arg BITCOIN_SHA256SUMS= -t ghcr.io/privkeyio/polar/clightning: --push . +$ docker buildx build --platform linux/amd64,linux/arm64 --build-arg CLN_VERSION= -t ghcr.io/privkeyio/polar/clightning: --push . ``` -Replace `` with a release of [privkeyio/lightning](https://github.com/privkeyio/lightning) without the leading `v` (ex: `26.06.8-blake2b.6`) `` with the sha256 of its `SHA256SUMS-v` once you have checked the `.asc` against the privkeyio key `A47D 99B6 DB0D 715D 40C5 9A20 23AE 8A8E A7E2 4E38` (for `26.06.8-blake2b.6`: `00de890637f5476a65de70bf52943d62173a5633b1c76b799bb2938b84bbd6bb`), and `` and `` as for Bitcoin Knots above, whose `bitcoin-cli` it uses. +Replace `` with a release of [privkeyio/lightning](https://github.com/privkeyio/lightning) without the leading `v` (ex: `26.06.8-blake2b.6`). The image builds on `ghcr.io/privkeyio/lightningd`, which privkeyio/lightning publishes for each release. The images can also be built and pushed from master with the `Images` workflow in GitHub Actions, passing the same build args one per line. diff --git a/docker/clightning/Dockerfile b/docker/clightning/Dockerfile index 17e7630c1..b394db6a1 100644 --- a/docker/clightning/Dockerfile +++ b/docker/clightning/Dockerfile @@ -1,41 +1,22 @@ -FROM ubuntu:24.04 +ARG CLN_VERSION +ARG CLN_IMAGE="ghcr.io/privkeyio/lightningd:v${CLN_VERSION}" + +FROM ${CLN_IMAGE} ARG CLN_VERSION -ARG CLN_SHA256SUMS -ARG BITCOIN_VERSION -ARG BITCOIN_SHA256SUMS -RUN userdel -r ubuntu \ - && apt-get update -y \ - && apt-get install -y curl gosu git xz-utils libsqlite3-0 libpq5 libsodium23 zlib1g \ +# install gosu +RUN apt-get update -y \ + && apt-get install -y curl gosu git \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -RUN SYS_ARCH="$(dpkg --print-architecture)" \ - && curl -SLO https://github.com/privkeyio/lightning/releases/download/v${CLN_VERSION}/clightning-v${CLN_VERSION}-Ubuntu-24.04-${SYS_ARCH}.tar.xz \ - && curl -SLO https://github.com/privkeyio/lightning/releases/download/v${CLN_VERSION}/SHA256SUMS-v${CLN_VERSION} \ - && echo "${CLN_SHA256SUMS} SHA256SUMS-v${CLN_VERSION}" | sha256sum -c \ - && sha256sum --ignore-missing -c SHA256SUMS-v${CLN_VERSION} \ - && tar -xJf clightning-*.tar.xz -C / \ - && rm clightning-*.tar.xz SHA256SUMS-* - -RUN SYS_ARCH="$(uname -m)" \ - && curl -SLO https://github.com/bitcoinknots/bitcoin/releases/download/v${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${SYS_ARCH}-linux-gnu.tar.gz \ - && curl -SLO https://github.com/bitcoinknots/bitcoin/releases/download/v${BITCOIN_VERSION}/SHA256SUMS \ - && echo "${BITCOIN_SHA256SUMS} SHA256SUMS" | sha256sum -c \ - && sha256sum --ignore-missing -c SHA256SUMS \ - && tar -xzf *.tar.gz \ - && install -m 755 bitcoin-${BITCOIN_VERSION}/bin/bitcoin-cli /usr/bin/bitcoin-cli \ - && rm -rf bitcoin-* SHA256SUMS - # download CLN bash completion file RUN curl -SLO https://raw.githubusercontent.com/privkeyio/lightning/v${CLN_VERSION}/contrib/lightning-cli.bash-completion \ - && mkdir -p /etc/bash_completion.d \ && mv lightning-cli.bash-completion /etc/bash_completion.d/lightning-cli # install lightning-cli bash completion RUN curl -SLO https://raw.githubusercontent.com/scop/bash-completion/master/bash_completion \ - && mkdir -p /usr/share/bash-completion \ && mv bash_completion /usr/share/bash-completion/ COPY docker-entrypoint.sh /entrypoint.sh @@ -49,4 +30,4 @@ EXPOSE 9735 9835 8080 10000 ENTRYPOINT ["/entrypoint.sh"] -CMD ["lightningd"] +CMD ["lightningd"] \ No newline at end of file