mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
Update the contrib arm32v7 and arm64v8 dockerfiles
This commit is contained in:
committed by
Christian Decker
parent
e778ebb9af
commit
a96ff3b097
@@ -32,9 +32,7 @@ RUN mkdir /opt/bitcoin && cd /opt/bitcoin \
|
|||||||
&& rm $BITCOIN_TARBALL
|
&& rm $BITCOIN_TARBALL
|
||||||
|
|
||||||
ENV LITECOIN_VERSION 0.16.3
|
ENV LITECOIN_VERSION 0.16.3
|
||||||
ENV LITECOIN_PGP_KEY FE3348877809386C
|
|
||||||
ENV LITECOIN_URL https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-x86_64-linux-gnu.tar.gz
|
ENV LITECOIN_URL https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-x86_64-linux-gnu.tar.gz
|
||||||
ENV LITECOIN_ASC_URL https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-linux-signatures.asc
|
|
||||||
ENV LITECOIN_SHA256 686d99d1746528648c2c54a1363d046436fd172beadaceea80bdc93043805994
|
ENV LITECOIN_SHA256 686d99d1746528648c2c54a1363d046436fd172beadaceea80bdc93043805994
|
||||||
|
|
||||||
# install litecoin binaries
|
# install litecoin binaries
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# * final: Copy the binaries required at runtime
|
# * final: Copy the binaries required at runtime
|
||||||
# The resulting image uploaded to dockerhub will only contain what is needed for runtime.
|
# The resulting image uploaded to dockerhub will only contain what is needed for runtime.
|
||||||
# From the root of the repository, run "docker build -t yourimage:yourtag -f contrib/linuxarm32v7.Dockerfile ."
|
# From the root of the repository, run "docker build -t yourimage:yourtag -f contrib/linuxarm32v7.Dockerfile ."
|
||||||
FROM debian:buster-slim as downloader
|
FROM debian:bullseye-slim as downloader
|
||||||
|
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
@@ -18,24 +18,23 @@ RUN wget -qO /opt/tini "https://github.com/krallin/tini/releases/download/v0.18.
|
|||||||
&& echo "01b54b934d5f5deb32aa4eb4b0f71d0e76324f4f0237cc262d59376bf2bdc269 /opt/tini" | sha256sum -c - \
|
&& echo "01b54b934d5f5deb32aa4eb4b0f71d0e76324f4f0237cc262d59376bf2bdc269 /opt/tini" | sha256sum -c - \
|
||||||
&& chmod +x /opt/tini
|
&& chmod +x /opt/tini
|
||||||
|
|
||||||
ARG BITCOIN_VERSION=0.18.1
|
ARG BITCOIN_VERSION=22.0
|
||||||
ENV BITCOIN_TARBALL bitcoin-$BITCOIN_VERSION-arm-linux-gnueabihf.tar.gz
|
ENV BITCOIN_TARBALL bitcoin-$BITCOIN_VERSION-arm-linux-gnueabihf.tar.gz
|
||||||
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL
|
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL
|
||||||
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS.asc
|
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS
|
||||||
|
|
||||||
RUN mkdir /opt/bitcoin && cd /opt/bitcoin \
|
RUN mkdir /opt/bitcoin && cd /opt/bitcoin \
|
||||||
&& wget -qO $BITCOIN_TARBALL "$BITCOIN_URL" \
|
&& wget -qO $BITCOIN_TARBALL "$BITCOIN_URL" \
|
||||||
&& wget -qO bitcoin.asc "$BITCOIN_ASC_URL" \
|
&& wget -qO bitcoin "$BITCOIN_ASC_URL" \
|
||||||
&& grep $BITCOIN_TARBALL bitcoin.asc | tee SHA256SUMS.asc \
|
&& grep $BITCOIN_TARBALL bitcoin | tee SHA256SUMS \
|
||||||
&& sha256sum -c SHA256SUMS.asc \
|
&& sha256sum -c SHA256SUMS \
|
||||||
&& BD=bitcoin-$BITCOIN_VERSION/bin \
|
&& BD=bitcoin-$BITCOIN_VERSION/bin \
|
||||||
&& tar -xzvf $BITCOIN_TARBALL $BD/bitcoin-cli --strip-components=1 \
|
&& tar -xzvf $BITCOIN_TARBALL $BD/bitcoin-cli --strip-components=1 \
|
||||||
&& rm $BITCOIN_TARBALL
|
&& rm $BITCOIN_TARBALL
|
||||||
|
|
||||||
ENV LITECOIN_VERSION 0.14.2
|
ENV LITECOIN_VERSION 0.16.3
|
||||||
ENV LITECOIN_TARBALL litecoin-$LITECOIN_VERSION-arm-linux-gnueabihf.tar.gz
|
ENV LITECOIN_URL https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-arm-linux-gnueabihf.tar.gz
|
||||||
ENV LITECOIN_URL https://download.litecoin.org/litecoin-$LITECOIN_VERSION/linux/$LITECOIN_TARBALL
|
ENV LITECOIN_SHA256 fc6897265594985c1d09978b377d51a01cc13ee144820ddc59fbb7078f122f99
|
||||||
ENV LITECOIN_SHA256 e79f2a8e8e1b9920d07cff8482237b56aa4be2623103d3d2825ce09a2cc2f6d7
|
|
||||||
|
|
||||||
# install litecoin binaries
|
# install litecoin binaries
|
||||||
RUN mkdir /opt/litecoin && cd /opt/litecoin \
|
RUN mkdir /opt/litecoin && cd /opt/litecoin \
|
||||||
@@ -45,11 +44,36 @@ RUN mkdir /opt/litecoin && cd /opt/litecoin \
|
|||||||
&& tar -xzvf litecoin.tar.gz $BD/litecoin-cli --strip-components=1 --exclude=*-qt \
|
&& tar -xzvf litecoin.tar.gz $BD/litecoin-cli --strip-components=1 --exclude=*-qt \
|
||||||
&& rm litecoin.tar.gz
|
&& rm litecoin.tar.gz
|
||||||
|
|
||||||
FROM debian:buster-slim as builder
|
FROM debian:bullseye-slim as builder
|
||||||
|
|
||||||
ENV LIGHTNINGD_VERSION=master
|
ENV LIGHTNINGD_VERSION=master
|
||||||
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 \
|
|
||||||
libc6-armhf-cross gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
|
RUN apt-get update -qq && \
|
||||||
|
apt-get install -qq -y --no-install-recommends \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
dirmngr \
|
||||||
|
gettext \
|
||||||
|
git \
|
||||||
|
gnupg \
|
||||||
|
libpq-dev \
|
||||||
|
libtool \
|
||||||
|
libffi-dev \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
python3-mako \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv \
|
||||||
|
python3-setuptools \
|
||||||
|
wget && \
|
||||||
|
# arm32v7 compilers
|
||||||
|
apt-get install -qq -y --no-install-recommends \
|
||||||
|
libc6-armhf-cross \
|
||||||
|
gcc-arm-linux-gnueabihf \
|
||||||
|
g++-arm-linux-gnueabihf
|
||||||
|
|
||||||
ENV target_host=arm-linux-gnueabihf
|
ENV target_host=arm-linux-gnueabihf
|
||||||
|
|
||||||
@@ -62,12 +86,12 @@ STRIP=${target_host}-strip \
|
|||||||
QEMU_LD_PREFIX=/usr/${target_host} \
|
QEMU_LD_PREFIX=/usr/${target_host} \
|
||||||
HOST=${target_host}
|
HOST=${target_host}
|
||||||
|
|
||||||
RUN wget -q https://zlib.net/zlib-1.2.12.tar.gz \
|
RUN wget -q https://zlib.net/zlib-1.2.13.tar.gz \
|
||||||
&& tar xvf zlib-1.2.12.tar.gz \
|
&& tar xvf zlib-1.2.13.tar.gz \
|
||||||
&& cd zlib-1.2.12 \
|
&& cd zlib-1.2.13 \
|
||||||
&& ./configure --prefix=$QEMU_LD_PREFIX \
|
&& ./configure --prefix=$QEMU_LD_PREFIX \
|
||||||
&& make \
|
&& make \
|
||||||
&& make install && cd .. && rm zlib-1.2.12.tar.gz && rm -rf zlib-1.2.12
|
&& make install && cd .. && rm zlib-1.2.13.tar.gz && rm -rf zlib-1.2.13
|
||||||
|
|
||||||
RUN apt-get install -y --no-install-recommends unzip tclsh \
|
RUN apt-get install -y --no-install-recommends unzip tclsh \
|
||||||
&& wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip \
|
&& wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip \
|
||||||
@@ -92,13 +116,28 @@ RUN git clone --recursive /tmp/lightning . && \
|
|||||||
|
|
||||||
ARG DEVELOPER=0
|
ARG DEVELOPER=0
|
||||||
ENV PYTHON_VERSION=3
|
ENV PYTHON_VERSION=3
|
||||||
RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVELOPER=${DEVELOPER} && make install
|
|
||||||
|
|
||||||
FROM arm32v7/debian:buster-slim as final
|
RUN curl -sSL https://install.python-poetry.org | python3 - \
|
||||||
|
&& pip3 install -U pip \
|
||||||
|
&& pip3 install -U wheel \
|
||||||
|
&& /root/.local/bin/poetry install
|
||||||
|
|
||||||
|
RUN ./configure --prefix=/tmp/lightning_install --enable-static && \
|
||||||
|
make DEVELOPER=${DEVELOPER} && \
|
||||||
|
/root/.local/bin/poetry run make install
|
||||||
|
|
||||||
|
FROM arm32v7/debian:bullseye-slim as final
|
||||||
COPY --from=downloader /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
|
COPY --from=downloader /usr/bin/qemu-arm-static /usr/bin/qemu-arm-static
|
||||||
COPY --from=downloader /opt/tini /usr/bin/tini
|
COPY --from=downloader /opt/tini /usr/bin/tini
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools python3 python3-pip \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
socat \
|
||||||
|
inotify-tools \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
libpq5 && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV LIGHTNINGD_DATA=/root/.lightning
|
ENV LIGHTNINGD_DATA=/root/.lightning
|
||||||
ENV LIGHTNINGD_RPC_PORT=9835
|
ENV LIGHTNINGD_RPC_PORT=9835
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# * final: Copy the binaries required at runtime
|
# * final: Copy the binaries required at runtime
|
||||||
# The resulting image uploaded to dockerhub will only contain what is needed for runtime.
|
# The resulting image uploaded to dockerhub will only contain what is needed for runtime.
|
||||||
# From the root of the repository, run "docker build -t yourimage:yourtag -f contrib/linuxarm64v8.Dockerfile ."
|
# From the root of the repository, run "docker build -t yourimage:yourtag -f contrib/linuxarm64v8.Dockerfile ."
|
||||||
FROM debian:buster-slim as downloader
|
FROM debian:bullseye-slim as downloader
|
||||||
|
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
@@ -18,24 +18,24 @@ RUN wget -qO /opt/tini "https://github.com/krallin/tini/releases/download/v0.18.
|
|||||||
&& echo "7c5463f55393985ee22357d976758aaaecd08defb3c5294d353732018169b019 /opt/tini" | sha256sum -c - \
|
&& echo "7c5463f55393985ee22357d976758aaaecd08defb3c5294d353732018169b019 /opt/tini" | sha256sum -c - \
|
||||||
&& chmod +x /opt/tini
|
&& chmod +x /opt/tini
|
||||||
|
|
||||||
ARG BITCOIN_VERSION=0.18.1
|
ARG BITCOIN_VERSION=22.0
|
||||||
ENV BITCOIN_TARBALL bitcoin-$BITCOIN_VERSION-aarch64-linux-gnu.tar.gz
|
ENV BITCOIN_TARBALL bitcoin-$BITCOIN_VERSION-aarch64-linux-gnu.tar.gz
|
||||||
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL
|
ENV BITCOIN_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/$BITCOIN_TARBALL
|
||||||
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS.asc
|
ENV BITCOIN_ASC_URL https://bitcoincore.org/bin/bitcoin-core-$BITCOIN_VERSION/SHA256SUMS
|
||||||
|
|
||||||
RUN mkdir /opt/bitcoin && cd /opt/bitcoin \
|
RUN mkdir /opt/bitcoin && cd /opt/bitcoin \
|
||||||
&& wget -qO $BITCOIN_TARBALL "$BITCOIN_URL" \
|
&& wget -qO $BITCOIN_TARBALL "$BITCOIN_URL" \
|
||||||
&& wget -qO bitcoin.asc "$BITCOIN_ASC_URL" \
|
&& wget -qO bitcoin "$BITCOIN_ASC_URL" \
|
||||||
&& grep $BITCOIN_TARBALL bitcoin.asc | tee SHA256SUMS.asc \
|
&& grep $BITCOIN_TARBALL bitcoin | tee SHA256SUMS \
|
||||||
&& sha256sum -c SHA256SUMS.asc \
|
&& sha256sum -c SHA256SUMS \
|
||||||
&& BD=bitcoin-$BITCOIN_VERSION/bin \
|
&& BD=bitcoin-$BITCOIN_VERSION/bin \
|
||||||
&& tar -xzvf $BITCOIN_TARBALL $BD/bitcoin-cli --strip-components=1 \
|
&& tar -xzvf $BITCOIN_TARBALL $BD/bitcoin-cli --strip-components=1 \
|
||||||
&& rm $BITCOIN_TARBALL
|
&& rm $BITCOIN_TARBALL
|
||||||
|
|
||||||
ENV LITECOIN_VERSION 0.14.2
|
|
||||||
ENV LITECOIN_TARBALL litecoin-$LITECOIN_VERSION-aarch64-linux-gnu.tar.gz
|
ENV LITECOIN_VERSION 0.16.3
|
||||||
ENV LITECOIN_URL https://download.litecoin.org/litecoin-$LITECOIN_VERSION/linux/$LITECOIN_TARBALL
|
ENV LITECOIN_URL https://download.litecoin.org/litecoin-${LITECOIN_VERSION}/linux/litecoin-${LITECOIN_VERSION}-aarch64-linux-gnu.tar.gz
|
||||||
ENV LITECOIN_SHA256 69449c3c8206f75cfdef929562b323326f1d0496f77f82608f9a974cbb2fd373
|
ENV LITECOIN_SHA256 3284316bdf10496528b3cd730877be3a1ea34add49dfc88fe0e96eb9925c1f08
|
||||||
|
|
||||||
# install litecoin binaries
|
# install litecoin binaries
|
||||||
RUN mkdir /opt/litecoin && cd /opt/litecoin \
|
RUN mkdir /opt/litecoin && cd /opt/litecoin \
|
||||||
@@ -45,11 +45,36 @@ RUN mkdir /opt/litecoin && cd /opt/litecoin \
|
|||||||
&& tar -xzvf litecoin.tar.gz $BD/litecoin-cli --strip-components=1 --exclude=*-qt \
|
&& tar -xzvf litecoin.tar.gz $BD/litecoin-cli --strip-components=1 --exclude=*-qt \
|
||||||
&& rm litecoin.tar.gz
|
&& rm litecoin.tar.gz
|
||||||
|
|
||||||
FROM debian:buster-slim as builder
|
FROM debian:bullseye-slim as builder
|
||||||
|
|
||||||
ENV LIGHTNINGD_VERSION=master
|
ENV LIGHTNINGD_VERSION=master
|
||||||
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 \
|
|
||||||
libc6-arm64-cross gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
RUN apt-get update -qq && \
|
||||||
|
apt-get install -qq -y --no-install-recommends \
|
||||||
|
autoconf \
|
||||||
|
automake \
|
||||||
|
build-essential \
|
||||||
|
ca-certificates \
|
||||||
|
curl \
|
||||||
|
dirmngr \
|
||||||
|
gettext \
|
||||||
|
git \
|
||||||
|
gnupg \
|
||||||
|
libpq-dev \
|
||||||
|
libtool \
|
||||||
|
libffi-dev \
|
||||||
|
python3 \
|
||||||
|
python3-dev \
|
||||||
|
python3-mako \
|
||||||
|
python3-pip \
|
||||||
|
python3-venv \
|
||||||
|
python3-setuptools \
|
||||||
|
wget && \
|
||||||
|
# arm64v8 compilers
|
||||||
|
apt-get install -qq -y --no-install-recommends \
|
||||||
|
libc6-arm64-cross \
|
||||||
|
gcc-aarch64-linux-gnu \
|
||||||
|
g++-aarch64-linux-gnu
|
||||||
|
|
||||||
ENV target_host=aarch64-linux-gnu
|
ENV target_host=aarch64-linux-gnu
|
||||||
|
|
||||||
@@ -62,12 +87,12 @@ STRIP=${target_host}-strip \
|
|||||||
QEMU_LD_PREFIX=/usr/${target_host} \
|
QEMU_LD_PREFIX=/usr/${target_host} \
|
||||||
HOST=${target_host}
|
HOST=${target_host}
|
||||||
|
|
||||||
RUN wget -q https://zlib.net/zlib-1.2.12.tar.gz \
|
RUN wget -q https://zlib.net/zlib-1.2.13.tar.gz \
|
||||||
&& tar xvf zlib-1.2.12.tar.gz \
|
&& tar xvf zlib-1.2.13.tar.gz \
|
||||||
&& cd zlib-1.2.12 \
|
&& cd zlib-1.2.13 \
|
||||||
&& ./configure --prefix=$QEMU_LD_PREFIX \
|
&& ./configure --prefix=$QEMU_LD_PREFIX \
|
||||||
&& make \
|
&& make \
|
||||||
&& make install && cd .. && rm zlib-1.2.12.tar.gz && rm -rf zlib-1.2.12
|
&& make install && cd .. && rm zlib-1.2.13.tar.gz && rm -rf zlib-1.2.13
|
||||||
|
|
||||||
RUN apt-get install -y --no-install-recommends unzip tclsh \
|
RUN apt-get install -y --no-install-recommends unzip tclsh \
|
||||||
&& wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip \
|
&& wget -q https://www.sqlite.org/2019/sqlite-src-3290000.zip \
|
||||||
@@ -91,13 +116,28 @@ RUN git clone --recursive /tmp/lightning . && \
|
|||||||
|
|
||||||
ARG DEVELOPER=0
|
ARG DEVELOPER=0
|
||||||
ENV PYTHON_VERSION=3
|
ENV PYTHON_VERSION=3
|
||||||
RUN ./configure --prefix=/tmp/lightning_install --enable-static && make -j3 DEVELOPER=${DEVELOPER} && make install
|
|
||||||
|
|
||||||
FROM arm64v8/debian:buster-slim as final
|
RUN curl -sSL https://install.python-poetry.org | python3 - \
|
||||||
|
&& pip3 install -U pip \
|
||||||
|
&& pip3 install -U wheel \
|
||||||
|
&& /root/.local/bin/poetry install
|
||||||
|
|
||||||
|
RUN ./configure --prefix=/tmp/lightning_install --enable-static && \
|
||||||
|
make DEVELOPER=${DEVELOPER} && \
|
||||||
|
/root/.local/bin/poetry run make install
|
||||||
|
|
||||||
|
FROM arm64v8/debian:bullseye-slim as final
|
||||||
COPY --from=downloader /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
|
COPY --from=downloader /usr/bin/qemu-aarch64-static /usr/bin/qemu-aarch64-static
|
||||||
COPY --from=downloader /opt/tini /usr/bin/tini
|
COPY --from=downloader /opt/tini /usr/bin/tini
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends socat inotify-tools python3 python3-pip \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
RUN apt-get update && \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
socat \
|
||||||
|
inotify-tools \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
libpq5 && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV LIGHTNINGD_DATA=/root/.lightning
|
ENV LIGHTNINGD_DATA=/root/.lightning
|
||||||
ENV LIGHTNINGD_RPC_PORT=9835
|
ENV LIGHTNINGD_RPC_PORT=9835
|
||||||
|
|||||||
Reference in New Issue
Block a user