1
- FROM node:12.16 -slim as builder
1
+ FROM node:16.8-bullseye -slim as builder
2
2
3
3
ARG DEVELOPER
4
4
ARG STANDALONE
5
5
ENV STANDALONE=$STANDALONE
6
6
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 " )
11
11
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
14
14
15
15
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)
23
22
24
23
# Install bitcoind
25
- ENV BITCOIN_VERSION 0.19.1
24
+ ENV BITCOIN_VERSION 0.21.0
26
25
ENV BITCOIN_FILENAME bitcoin-$BITCOIN_VERSION-x86_64-linux-gnu.tar.gz
27
26
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_FILENAME
28
- ENV BITCOIN_SHA256 5fcac9416e486d4960e1a946145566350ca670f9aaba99de6542080851122e4c
27
+ ENV BITCOIN_SHA256 da7766775e3f9c98d7a9145429f2be8297c2672fe5b118fd3dc2411fb48e0032
29
28
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS.asc
30
29
ENV BITCOIN_PGP_KEY 01EA5486DE18A882D4C2684590C8019E36C2E964
31
30
RUN [ -n "$STANDALONE" ] || \
@@ -34,23 +33,22 @@ RUN [ -n "$STANDALONE" ] || \
34
33
&& echo "$BITCOIN_SHA256 $BITCOIN_FILENAME" | sha256sum -c - \
35
34
&& gpg --keyserver keyserver.ubuntu.com --recv-keys "$BITCOIN_PGP_KEY" \
36
35
&& 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 - \
39
37
&& BD=bitcoin-$BITCOIN_VERSION/bin \
40
38
&& tar -xzvf "$BITCOIN_FILENAME" $BD/bitcoind $BD/bitcoin-cli --strip-components=1)
41
39
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
+
46
42
# npm doesn't normally like running as root, allow it since we're in docker
47
43
RUN npm config set unsafe-perm true
48
44
49
45
# 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" \
51
47
&& echo "12d20136605531b09a2c2dac02ccee85e1b874eb322ef6baf7561cd93f93c855 /opt/bin/tini" | sha256sum -c - \
52
48
&& chmod +x /opt/bin/tini
53
49
50
+ RUN ls -l /opt/lightning
51
+
54
52
# Install Spark
55
53
WORKDIR /opt/spark/client
56
54
COPY client/package.json client/npm-shrinkwrap.json ./
@@ -71,7 +69,7 @@ RUN npm run dist:npm \
71
69
72
70
# Prepare final image
73
71
74
- FROM node:12.16 -slim
72
+ FROM node:16.8-bullseye -slim
75
73
76
74
ARG STANDALONE
77
75
ENV STANDALONE=$STANDALONE
@@ -85,8 +83,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends xz-utils inotif
85
83
&& mkdir /data \
86
84
&& ln -s /data/lightning $HOME/.lightning
87
85
88
- COPY --from=builder /opt/bin /usr/bin
89
86
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
90
91
91
92
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
92
93
0 commit comments