Skip to content

Commit a96ff3b

Browse files
NicolasDoriercdecker
authored andcommitted
Update the contrib arm32v7 and arm64v8 dockerfiles
1 parent e778ebb commit a96ff3b

File tree

3 files changed

+121
-44
lines changed

3 files changed

+121
-44
lines changed

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ RUN mkdir /opt/bitcoin && cd /opt/bitcoin \
3232
&& rm $BITCOIN_TARBALL
3333

3434
ENV LITECOIN_VERSION 0.16.3
35-
ENV LITECOIN_PGP_KEY FE3348877809386C
3635
ENV LITECOIN_URL https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-x86_64-linux-gnu.tar.gz
37-
ENV LITECOIN_ASC_URL https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-linux-signatures.asc
3836
ENV LITECOIN_SHA256 686d99d1746528648c2c54a1363d046436fd172beadaceea80bdc93043805994
3937

4038
# install litecoin binaries

contrib/docker/linuxarm32v7.Dockerfile

Lines changed: 60 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# * final: Copy the binaries required at runtime
66
# The resulting image uploaded to dockerhub will only contain what is needed for runtime.
77
# From the root of the repository, run "docker build -t yourimage:yourtag -f contrib/linuxarm32v7.Dockerfile ."
8-
FROM debian:buster-slim as downloader
8+
FROM debian:bullseye-slim as downloader
99

1010
RUN set -ex \
1111
&& apt-get update \
@@ -18,24 +18,23 @@ RUN wget -qO /opt/tini "https://github.com/krallin/tini/releases/download/v0.18.
1818
&& echo "01b54b934d5f5deb32aa4eb4b0f71d0e76324f4f0237cc262d59376bf2bdc269 /opt/tini" | sha256sum -c - \
1919
&& chmod +x /opt/tini
2020

21-
ARG BITCOIN_VERSION=0.18.1
21+
ARG BITCOIN_VERSION=22.0
2222
ENV BITCOIN_TARBALL bitcoin-$BITCOIN_VERSION-arm-linux-gnueabihf.tar.gz
2323
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL
24-
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS.asc
24+
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS
2525

2626
RUN mkdir /opt/bitcoin && cd /opt/bitcoin \
2727
&& wget -qO $BITCOIN_TARBALL "$BITCOIN_URL" \
28-
&& wget -qO bitcoin.asc "$BITCOIN_ASC_URL" \
29-
&& grep $BITCOIN_TARBALL bitcoin.asc | tee SHA256SUMS.asc \
30-
&& sha256sum -c SHA256SUMS.asc \
28+
&& wget -qO bitcoin "$BITCOIN_ASC_URL" \
29+
&& grep $BITCOIN_TARBALL bitcoin | tee SHA256SUMS \
30+
&& sha256sum -c SHA256SUMS \
3131
&& BD=bitcoin-$BITCOIN_VERSION/bin \
3232
&& tar -xzvf $BITCOIN_TARBALL $BD/bitcoin-cli --strip-components=1 \
3333
&& rm $BITCOIN_TARBALL
3434

35-
ENV LITECOIN_VERSION 0.14.2
36-
ENV LITECOIN_TARBALL litecoin-$LITECOIN_VERSION-arm-linux-gnueabihf.tar.gz
37-
ENV LITECOIN_URL https://download.litecoin.org/litecoin-$LITECOIN_VERSION/linux/$LITECOIN_TARBALL
38-
ENV LITECOIN_SHA256 e79f2a8e8e1b9920d07cff8482237b56aa4be2623103d3d2825ce09a2cc2f6d7
35+
ENV LITECOIN_VERSION 0.16.3
36+
ENV LITECOIN_URL https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-arm-linux-gnueabihf.tar.gz
37+
ENV LITECOIN_SHA256 fc6897265594985c1d09978b377d51a01cc13ee144820ddc59fbb7078f122f99
3938

4039
# install litecoin binaries
4140
RUN mkdir /opt/litecoin && cd /opt/litecoin \
@@ -45,11 +44,36 @@ RUN mkdir /opt/litecoin && cd /opt/litecoin \
4544
&& tar -xzvf litecoin.tar.gz $BD/litecoin-cli --strip-components=1 --exclude=*-qt \
4645
&& rm litecoin.tar.gz
4746

48-
FROM debian:buster-slim as builder
47+
FROM debian:bullseye-slim as builder
4948

5049
ENV LIGHTNINGD_VERSION=master
51-
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates autoconf automake build-essential gettext git libtool python3 python3-pip python3-setuptools python3-mako wget gnupg dirmngr git lowdown \
52-
libc6-armhf-cross gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
50+
51+
RUN apt-get update -qq && \
52+
apt-get install -qq -y --no-install-recommends \
53+
autoconf \
54+
automake \
55+
build-essential \
56+
ca-certificates \
57+
curl \
58+
dirmngr \
59+
gettext \
60+
git \
61+
gnupg \
62+
libpq-dev \
63+
libtool \
64+
libffi-dev \
65+
python3 \
66+
python3-dev \
67+
python3-mako \
68+
python3-pip \
69+
python3-venv \
70+
python3-setuptools \
71+
wget && \
72+
# arm32v7 compilers
73+
apt-get install -qq -y --no-install-recommends \
74+
libc6-armhf-cross \
75+
gcc-arm-linux-gnueabihf \
76+
g++-arm-linux-gnueabihf
5377

5478
ENV target_host=arm-linux-gnueabihf
5579

@@ -62,12 +86,12 @@ STRIP=${target_host}-strip \
6286
QEMU_LD_PREFIX=/usr/${target_host} \
6387
HOST=${target_host}
6488

65-
RUN wget -q https://zlib.net/zlib-1.2.12.tar.gz \
66-
&& tar xvf zlib-1.2.12.tar.gz \
67-
&& cd zlib-1.2.12 \
89+
RUN wget -q https://zlib.net/zlib-1.2.13.tar.gz \
90+
&& tar xvf zlib-1.2.13.tar.gz \
91+
&& cd zlib-1.2.13 \
6892
&& ./configure --prefix=$QEMU_LD_PREFIX \
6993
&& make \
70-
&& make install && cd .. && rm zlib-1.2.12.tar.gz && rm -rf zlib-1.2.12
94+
&& make install && cd .. && rm zlib-1.2.13.tar.gz && rm -rf zlib-1.2.13
7195

7296
RUN apt-get install -y --no-install-recommends unzip tclsh \
7397
&& wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip \
@@ -92,13 +116,28 @@ RUN git clone --recursive /tmp/lightning . && \
92116

93117
ARG DEVELOPER=0
94118
ENV PYTHON_VERSION=3
95-
RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVELOPER=${DEVELOPER} && make install
96119

97-
FROM arm32v7/debian:buster-slim as final
120+
RUN curl -sSL https://install.python-poetry.org | python3 - \
121+
&& pip3 install -U pip \
122+
&& pip3 install -U wheel \
123+
&& /root/.local/bin/poetry install
124+
125+
RUN ./configure --prefix=/tmp/lightning_install --enable-static && \
126+
make DEVELOPER=${DEVELOPER} && \
127+
/root/.local/bin/poetry run make install
128+
129+
FROM arm32v7/debian:bullseye-slim as final
98130
COPY --from=downloader /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
99131
COPY --from=downloader /opt/tini /usr/bin/tini
100-
RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools python3 python3-pip \
101-
&& rm -rf /var/lib/apt/lists/*
132+
133+
RUN apt-get update && \
134+
apt-get install -y --no-install-recommends \
135+
socat \
136+
inotify-tools \
137+
python3 \
138+
python3-pip \
139+
libpq5 && \
140+
rm -rf /var/lib/apt/lists/*
102141

103142
ENV LIGHTNINGD_DATA=/root/.lightning
104143
ENV LIGHTNINGD_RPC_PORT=9835

contrib/docker/linuxarm64v8.Dockerfile

Lines changed: 61 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# * final: Copy the binaries required at runtime
66
# The resulting image uploaded to dockerhub will only contain what is needed for runtime.
77
# From the root of the repository, run "docker build -t yourimage:yourtag -f contrib/linuxarm64v8.Dockerfile ."
8-
FROM debian:buster-slim as downloader
8+
FROM debian:bullseye-slim as downloader
99

1010
RUN set -ex \
1111
&& apt-get update \
@@ -18,24 +18,24 @@ RUN wget -qO /opt/tini "https://github.com/krallin/tini/releases/download/v0.18.
1818
&& echo "7c5463f55393985ee22357d976758aaaecd08defb3c5294d353732018169b019 /opt/tini" | sha256sum -c - \
1919
&& chmod +x /opt/tini
2020

21-
ARG BITCOIN_VERSION=0.18.1
21+
ARG BITCOIN_VERSION=22.0
2222
ENV BITCOIN_TARBALL bitcoin-$BITCOIN_VERSION-aarch64-linux-gnu.tar.gz
2323
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL
24-
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS.asc
24+
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS
2525

2626
RUN mkdir /opt/bitcoin && cd /opt/bitcoin \
2727
&& wget -qO $BITCOIN_TARBALL "$BITCOIN_URL" \
28-
&& wget -qO bitcoin.asc "$BITCOIN_ASC_URL" \
29-
&& grep $BITCOIN_TARBALL bitcoin.asc | tee SHA256SUMS.asc \
30-
&& sha256sum -c SHA256SUMS.asc \
28+
&& wget -qO bitcoin "$BITCOIN_ASC_URL" \
29+
&& grep $BITCOIN_TARBALL bitcoin | tee SHA256SUMS \
30+
&& sha256sum -c SHA256SUMS \
3131
&& BD=bitcoin-$BITCOIN_VERSION/bin \
3232
&& tar -xzvf $BITCOIN_TARBALL $BD/bitcoin-cli --strip-components=1 \
3333
&& rm $BITCOIN_TARBALL
3434

35-
ENV LITECOIN_VERSION 0.14.2
36-
ENV LITECOIN_TARBALL litecoin-$LITECOIN_VERSION-aarch64-linux-gnu.tar.gz
37-
ENV LITECOIN_URL https://download.litecoin.org/litecoin-$LITECOIN_VERSION/linux/$LITECOIN_TARBALL
38-
ENV LITECOIN_SHA256 69449c3c8206f75cfdef929562b323326f1d0496f77f82608f9a974cbb2fd373
35+
36+
ENV LITECOIN_VERSION 0.16.3
37+
ENV LITECOIN_URL https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-aarch64-linux-gnu.tar.gz
38+
ENV LITECOIN_SHA256 3284316bdf10496528b3cd730877be3a1ea34add49dfc88fe0e96eb9925c1f08
3939

4040
# install litecoin binaries
4141
RUN mkdir /opt/litecoin && cd /opt/litecoin \
@@ -45,11 +45,36 @@ RUN mkdir /opt/litecoin && cd /opt/litecoin \
4545
&& tar -xzvf litecoin.tar.gz $BD/litecoin-cli --strip-components=1 --exclude=*-qt \
4646
&& rm litecoin.tar.gz
4747

48-
FROM debian:buster-slim as builder
48+
FROM debian:bullseye-slim as builder
4949

5050
ENV LIGHTNINGD_VERSION=master
51-
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates autoconf automake build-essential gettext git libtool python3 python3-pip python3-setuptools python3-mako wget gnupg dirmngr git lowdown \
52-
libc6-arm64-cross gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
51+
52+
RUN apt-get update -qq && \
53+
apt-get install -qq -y --no-install-recommends \
54+
autoconf \
55+
automake \
56+
build-essential \
57+
ca-certificates \
58+
curl \
59+
dirmngr \
60+
gettext \
61+
git \
62+
gnupg \
63+
libpq-dev \
64+
libtool \
65+
libffi-dev \
66+
python3 \
67+
python3-dev \
68+
python3-mako \
69+
python3-pip \
70+
python3-venv \
71+
python3-setuptools \
72+
wget && \
73+
# arm64v8 compilers
74+
apt-get install -qq -y --no-install-recommends \
75+
libc6-arm64-cross \
76+
gcc-aarch64-linux-gnu \
77+
g++-aarch64-linux-gnu
5378

5479
ENV target_host=aarch64-linux-gnu
5580

@@ -62,12 +87,12 @@ STRIP=${target_host}-strip \
6287
QEMU_LD_PREFIX=/usr/${target_host} \
6388
HOST=${target_host}
6489

65-
RUN wget -q https://zlib.net/zlib-1.2.12.tar.gz \
66-
&& tar xvf zlib-1.2.12.tar.gz \
67-
&& cd zlib-1.2.12 \
90+
RUN wget -q https://zlib.net/zlib-1.2.13.tar.gz \
91+
&& tar xvf zlib-1.2.13.tar.gz \
92+
&& cd zlib-1.2.13 \
6893
&& ./configure --prefix=$QEMU_LD_PREFIX \
6994
&& make \
70-
&& make install && cd .. && rm zlib-1.2.12.tar.gz && rm -rf zlib-1.2.12
95+
&& make install && cd .. && rm zlib-1.2.13.tar.gz && rm -rf zlib-1.2.13
7196

7297
RUN apt-get install -y --no-install-recommends unzip tclsh \
7398
&& wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip \
@@ -91,13 +116,28 @@ RUN git clone --recursive /tmp/lightning . && \
91116

92117
ARG DEVELOPER=0
93118
ENV PYTHON_VERSION=3
94-
RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVELOPER=${DEVELOPER} && make install
95119

96-
FROM arm64v8/debian:buster-slim as final
120+
RUN curl -sSL https://install.python-poetry.org | python3 - \
121+
&& pip3 install -U pip \
122+
&& pip3 install -U wheel \
123+
&& /root/.local/bin/poetry install
124+
125+
RUN ./configure --prefix=/tmp/lightning_install --enable-static && \
126+
make DEVELOPER=${DEVELOPER} && \
127+
/root/.local/bin/poetry run make install
128+
129+
FROM arm64v8/debian:bullseye-slim as final
97130
COPY --from=downloader /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
98131
COPY --from=downloader /opt/tini /usr/bin/tini
99-
RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools python3 python3-pip \
100-
&& rm -rf /var/lib/apt/lists/*
132+
133+
RUN apt-get update && \
134+
apt-get install -y --no-install-recommends \
135+
socat \
136+
inotify-tools \
137+
python3 \
138+
python3-pip \
139+
libpq5 && \
140+
rm -rf /var/lib/apt/lists/*
101141

102142
ENV LIGHTNINGD_DATA=/root/.lightning
103143
ENV LIGHTNINGD_RPC_PORT=9835

0 commit comments

Comments
 (0)