Skip to content

Commit e252c1c

Browse files
committed
docker: Update to Debian 11, Bitcoin Core v0.21.0, c-lightning v0.10.1 and nodejs v16.8
1 parent e7b6d7e commit e252c1c

File tree

3 files changed

+30
-28
lines changed

3 files changed

+30
-28
lines changed

CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333

3434
This raises the minimally supported c-lightning version to v0.7.1.
3535

36+
- docker: Update to Bitcoin Core v0.21.0, c-lightning v0.10.1 and nodejs v16.8
37+
3638
## 0.2.17 - 2020-09-03
3739

3840
Hotfix release - Fix YAML rendering of payments with unknown destination/description. This bug only manfiests when expert mode is enabled.

Dockerfile

+26-25
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1-
FROM node:12.16-slim as builder
1+
FROM node:16.8-bullseye-slim as builder
22

33
ARG DEVELOPER
44
ARG STANDALONE
55
ENV STANDALONE=$STANDALONE
66

7-
# Install build c-lightning for third-party packages (c-lightning/bitcoind)
8-
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates gpg dirmngr wget \
9-
$([ -n "$STANDALONE" ] || echo "autoconf automake build-essential gettext libtool libgmp-dev \
10-
libsqlite3-dev python python3 python3-mako wget zlib1g-dev")
7+
# Install build dependencies for third-party packages (c-lightning/bitcoind)
8+
RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates dirmngr wget \
9+
$([ -n "$STANDALONE" ] || echo "autoconf automake build-essential gettext gpg gpg-agent libtool libgmp-dev \
10+
libsqlite3-dev python python3 python3-mako wget zlib1g-dev unzip")
1111

12-
ENV LIGHTNINGD_VERSION=v0.8.1
13-
ENV LIGHTNINGD_PGP_KEY=15EE8D6CAB0E7F0CF999BFCBD9200E6CD1ADB8F1
12+
ENV LIGHTNINGD_VERSION=0.10.1
13+
ENV LIGHTNINGD_SHA256=9271e9e89d60332b66afedbf8d6eab2a4a488782ab400ee1f60667d73c5a9a96
1414

1515
RUN [ -n "$STANDALONE" ] || ( \
16-
git clone https://github.com/ElementsProject/lightning.git /opt/lightningd \
17-
&& cd /opt/lightningd \
18-
&& gpg --keyserver keyserver.ubuntu.com --recv-keys "$LIGHTNINGD_PGP_KEY" \
19-
&& git verify-tag $LIGHTNINGD_VERSION \
20-
&& git checkout $LIGHTNINGD_VERSION \
21-
&& DEVELOPER=$DEVELOPER ./configure \
22-
&& make)
16+
wget -O /tmp/lightning.zip https://github.com/ElementsProject/lightning/releases/download/v$LIGHTNINGD_VERSION/clightning-v$LIGHTNINGD_VERSION.zip \
17+
&& echo "$LIGHTNINGD_SHA256 /tmp/lightning.zip" | sha256sum -c \
18+
&& unzip /tmp/lightning.zip -d /tmp/lightning \
19+
&& cd /tmp/lightning/clightning* \
20+
&& DEVELOPER=$DEVELOPER ./configure --prefix=/opt/lightning \
21+
&& make && make install)
2322

2423
# Install bitcoind
25-
ENV BITCOIN_VERSION 0.19.1
24+
ENV BITCOIN_VERSION 0.21.0
2625
ENV BITCOIN_FILENAME bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz
2726
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_FILENAME
28-
ENV BITCOIN_SHA256 5fcac9416e486d4960e1a946145566350ca670f9aaba99de6542080851122e4c
27+
ENV BITCOIN_SHA256 da7766775e3f9c98d7a9145429f2be8297c2672fe5b118fd3dc2411fb48e0032
2928
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS.asc
3029
ENV BITCOIN_PGP_KEY 01EA5486DE18A882D4C2684590C8019E36C2E964
3130
RUN [ -n "$STANDALONE" ] || \
@@ -34,23 +33,22 @@ RUN [ -n "$STANDALONE" ] || \
3433
&& echo "$BITCOIN_SHA256 $BITCOIN_FILENAME" | sha256sum -c - \
3534
&& gpg --keyserver keyserver.ubuntu.com --recv-keys "$BITCOIN_PGP_KEY" \
3635
&& wget -qO bitcoin.asc "$BITCOIN_ASC_URL" \
37-
&& gpg --verify bitcoin.asc \
38-
&& cat bitcoin.asc | grep "$BITCOIN_FILENAME" | sha256sum -c - \
36+
&& gpg --decrypt bitcoin.asc | grep "$BITCOIN_FILENAME" | sha256sum -c - \
3937
&& BD=bitcoin-$BITCOIN_VERSION/bin \
4038
&& tar -xzvf "$BITCOIN_FILENAME" $BD/bitcoind $BD/bitcoin-cli --strip-components=1)
4139

42-
RUN mkdir /opt/bin && ([ -n "$STANDALONE" ] || \
43-
(mv /opt/lightningd/cli/lightning-cli /opt/bin/ \
44-
&& mv /opt/lightningd/lightningd/lightning* /opt/bin/ \
45-
&& mv /opt/bitcoin/bin/* /opt/bin/))
40+
RUN mkdir -p /opt/bin /opt/bitcoin/bin /opt/lightning
41+
4642
# npm doesn't normally like running as root, allow it since we're in docker
4743
RUN npm config set unsafe-perm true
4844

4945
# Install tini
50-
RUN wget -qO /opt/bin/tini "https://github.com/krallin/tini/releases/download/v0.18.0/tini-amd64" \
46+
RUN wget -O /opt/bin/tini "https://github.com/krallin/tini/releases/download/v0.18.0/tini-amd64" \
5147
&& echo "12d20136605531b09a2c2dac02ccee85e1b874eb322ef6baf7561cd93f93c855 /opt/bin/tini" | sha256sum -c - \
5248
&& chmod +x /opt/bin/tini
5349

50+
RUN ls -l /opt/lightning
51+
5452
# Install Spark
5553
WORKDIR /opt/spark/client
5654
COPY client/package.json client/npm-shrinkwrap.json ./
@@ -71,7 +69,7 @@ RUN npm run dist:npm \
7169

7270
# Prepare final image
7371

74-
FROM node:12.16-slim
72+
FROM node:16.8-bullseye-slim
7573

7674
ARG STANDALONE
7775
ENV STANDALONE=$STANDALONE
@@ -85,8 +83,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends xz-utils inotif
8583
&& mkdir /data \
8684
&& ln -s /data/lightning $HOME/.lightning
8785

88-
COPY --from=builder /opt/bin /usr/bin
8986
COPY --from=builder /opt/spark /opt/spark
87+
COPY --from=builder /opt/lightning /opt/lightning
88+
COPY --from=builder /opt/bitcoin/bin/ /usr/bin
89+
COPY --from=builder /opt/bin/ /usr/bin
90+
RUN ln -s /opt/lightning/bin/* /usr/bin
9091

9192
ENV CONFIG=/data/spark/config TLS_PATH=/data/spark/tls TOR_PATH=/data/spark/tor COOKIE_FILE=/data/spark/cookie HOST=0.0.0.0
9293

scripts/builder.Dockerfile

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
# nodejs v12.5 doesn't play well with the `faketime` library used for deterministic builds
2-
FROM node:12.4-stretch
1+
FROM node:16.8-stretch
32

43
ENV TZ=UTC
54
ENV PATH=./node_modules/.bin:$PATH
65
# npm doesn't normally like running as root, allow it since we're in docker
76
RUN npm config set unsafe-perm true
87

98
RUN apt-get update && apt-get install -y --no-install-recommends git=1:2.11.0-3+deb9u7 binutils=2.28-5 software-properties-common=0.96.20.2-1+deb9u1 \
10-
apt-transport-https=1.4.10 unzip=6.0-21+deb9u2 faketime=0.9.6-7+b1 fuse=2.9.7-1+deb9u2 disorderfs=0.5.1-1+b1
9+
unzip=6.0-21+deb9u2 faketime=0.9.6-7+b1 fuse=2.9.7-1+deb9u2 disorderfs=0.5.1-1+b1
1110

1211
# Wine for Electron Windows builds
1312
# copied from https://github.com/electron-userland/electron-builder/blob/master/docker/wine/Dockerfile

0 commit comments

Comments
 (0)