Merge branch 'docker-20-compat' into 'main'

Docker 20 compat

See merge request lightning-signer/vls-container!5
This commit is contained in:
Lakshya Singh 2023-10-14 02:00:00 +00:00
commit 043186484a
3 changed files with 11 additions and 7 deletions

View File

@ -1,5 +1,5 @@
# Build stage for Bitcoin Core # Build stage for Bitcoin Core
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM}} alpine:3.18 as bitcoin-core FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as bitcoin-core
ARG TARGETPLATFORM ARG TARGETPLATFORM
@ -19,7 +19,8 @@ RUN apk add \
sqlite-dev \ sqlite-dev \
zeromq-dev zeromq-dev
RUN set -ex \ ENV GNUPGHOME=/root/.gnupg
RUN mkdir $GNUPGHOME && set -ex \
&& for key in \ && for key in \
152812300785C96444D3334D17565732E08E5E41 \ 152812300785C96444D3334D17565732E08E5E41 \
0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \ 0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \
@ -46,6 +47,8 @@ RUN set -ex \
done && \ done && \
wget -O- https://raw.githubusercontent.com/Kvaciral/kvaciral/main/kvaciral.asc | gpg --import wget -O- https://raw.githubusercontent.com/Kvaciral/kvaciral/main/kvaciral.asc | gpg --import
RUN gpg -kv
ARG BITCOIN_VERSION=23.0 ARG BITCOIN_VERSION=23.0
ARG BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION} ARG BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}
ARG SHA256SUMS_HASH=aaff81ea001f499e8f6f3221387d7db960d71a3b7a4a2b1aaf2c8060bc94a391 ARG SHA256SUMS_HASH=aaff81ea001f499e8f6f3221387d7db960d71a3b7a4a2b1aaf2c8060bc94a391
@ -53,7 +56,7 @@ ARG SHA256SUMS_HASH=aaff81ea001f499e8f6f3221387d7db960d71a3b7a4a2b1aaf2c8060bc94
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}.tar.gz
RUN gpg --verify SHA256SUMS.asc SHA256SUMS RUN gpg --batch --verify SHA256SUMS.asc SHA256SUMS
RUN echo "${SHA256SUMS_HASH} SHA256SUMS" | sha256sum -c - RUN echo "${SHA256SUMS_HASH} SHA256SUMS" | sha256sum -c -
RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS | sha256sum -c - RUN grep " bitcoin-${BITCOIN_VERSION}.tar.gz\$" SHA256SUMS | sha256sum -c -
RUN tar -xzf *.tar.gz RUN tar -xzf *.tar.gz
@ -84,7 +87,7 @@ RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a
RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0 RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0
# Runtime binaries and setup stage # Runtime binaries and setup stage
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM}} alpine:3.18 as runner FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as runner
ARG UID=100 ARG UID=100
ARG GID=101 ARG GID=101

View File

@ -3,6 +3,7 @@ services:
bitcoin-core: bitcoin-core:
build: build:
dockerfile: ./bitcoind/Dockerfile dockerfile: ./bitcoind/Dockerfile
context: .
image: bitcoind image: bitcoind
container_name: bitcoind-test container_name: bitcoind-test
volumes: volumes:
@ -19,6 +20,7 @@ services:
core-lightning: core-lightning:
build: build:
dockerfile: ./lightningd/Dockerfile dockerfile: ./lightningd/Dockerfile
context: .
image: lightningd image: lightningd
container_name: lightningd-test container_name: lightningd-test
command: command:
@ -33,7 +35,6 @@ services:
depends_on: depends_on:
bitcoin-core: bitcoin-core:
condition: service_healthy condition: service_healthy
restart: true
env_file: env_file:
- ./assets/testnet-env - ./assets/testnet-env
environment: environment:

View File

@ -1,5 +1,5 @@
# build stage for core lightning and clboss # build stage for core lightning and clboss
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM}} alpine:3.18 as builder FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as bitcoin-core
ARG TARGETPLATFORM ARG TARGETPLATFORM
@ -50,7 +50,7 @@ RUN git clone --recurse-submodules https://github.com/ZmnSCPxj/clboss.git /clbos
make install make install
# final stage with runtime dependencies and pkgs # final stage with runtime dependencies and pkgs
FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM}} alpine:3.18 as runner FROM --platform=${TARGETPLATFORM:-${BUILDPLATFORM:-linux/amd64}} alpine:3.18 as runner
LABEL maintainer.0="Lakshya Singh (@king-11)" \ LABEL maintainer.0="Lakshya Singh (@king-11)" \
maintainer.1="Dev Random (@devrandom01)" maintainer.1="Dev Random (@devrandom01)"