Skip to content

Commit 9b542c4

Browse files
committed
29: add bitcoind v29.0
1 parent d60bb4d commit 9b542c4

File tree

6 files changed

+282
-1
lines changed

6 files changed

+282
-1
lines changed

.github/workflows/build.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ jobs:
88
strategy:
99
matrix:
1010
version:
11+
- '29'
12+
- '29/alpine'
1113
- '28'
1214
- '28/alpine'
1315
- '27'

29/Dockerfile

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
FROM debian:bookworm-slim
2+
3+
ARG UID=101
4+
ARG GID=101
5+
6+
LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \
7+
maintainer.1="Pedro Branco (@pedrobranco)" \
8+
maintainer.2="Rui Marinho (@ruimarinho)"
9+
10+
RUN groupadd --gid ${GID} bitcoin \
11+
&& useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \
12+
&& apt-get update -y \
13+
&& apt-get install -y curl gnupg gosu \
14+
&& apt-get clean \
15+
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
16+
17+
# Special variables just for release candidates, both should be empty for stable
18+
# releases.
19+
ARG RC
20+
ARG RC_DIR
21+
22+
ARG TARGETPLATFORM
23+
ENV BITCOIN_VERSION=29.0
24+
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
25+
ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}${RC}/bin:$PATH
26+
27+
RUN set -ex \
28+
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \
29+
&& if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \
30+
&& if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi \
31+
&& for key in \
32+
101598DC823C1B5F9A6624ABA5E0907A0380E6C3 \
33+
6A8F9C266528E25AEB1D7731C2371D91CB716EA7 \
34+
2840EAABF4BC9F0FFD716AFAFBAFCC46DE2D3FE2 \
35+
E86AE73439625BBEE306AAE6B66D427F873CB1A3 \
36+
A0083660F235A27000CD3C81CE6EC49945C17EA6 \
37+
F19F5FF2B0589EC341220045BA03F4DBE0C63FB4 \
38+
637DB1E23370F84AFF88CCE03152347D07DA627C \
39+
ED9BDF7AD6A55E232E84524257FF9BDBCC301009 \
40+
CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \
41+
152812300785C96444D3334D17565732E08E5E41 \
42+
C388F6961FB972A95678E327F62711DBDCA8AE56 \
43+
9DEAE0DC7063249FB05474681E4AED62986CD25D \
44+
D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \
45+
F4FC70F07310028424EFC20A8E4256593F177720 \
46+
E61773CD6E01040E2F1BD78CE7E2984B6289C93A \
47+
9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C \
48+
33C103B4B2794170546CCF7BCFB2C83C66CD792A \
49+
0CCBAAFD76A2ECE2CCD3141DE2FFD5B1D88CA97D \
50+
F2CFC4ABD0B99D837EEBB7D09B79B45691DB4173 \
51+
; do \
52+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
53+
gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \
54+
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
55+
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
56+
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
57+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
58+
done \
59+
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/${RC_DIR}bitcoin-${BITCOIN_VERSION}${RC}-${TARGETPLATFORM}.tar.gz \
60+
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/${RC_DIR}SHA256SUMS \
61+
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/${RC_DIR}SHA256SUMS.asc \
62+
&& gpg --verify SHA256SUMS.asc SHA256SUMS \
63+
&& grep " bitcoin-${BITCOIN_VERSION}${RC}-${TARGETPLATFORM}.tar.gz" SHA256SUMS | sha256sum -c - \
64+
&& tar -xzf *.tar.gz -C /opt \
65+
&& rm *.tar.gz *.asc \
66+
&& rm -rf /opt/bitcoin-${BITCOIN_VERSION}${RC}/bin/bitcoin-qt
67+
68+
COPY docker-entrypoint.sh /entrypoint.sh
69+
70+
VOLUME ["/home/bitcoin/.bitcoin"]
71+
72+
EXPOSE 8332 8333 18332 18333 18443 18444 38333 38332
73+
74+
ENTRYPOINT ["/entrypoint.sh"]
75+
76+
RUN bitcoind -version | grep "Bitcoin Core daemon version v${BITCOIN_VERSION}"
77+
78+
CMD ["bitcoind"]

29/alpine/Dockerfile

+120
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
# Build stage for Bitcoin Core
2+
FROM alpine as bitcoin-core
3+
4+
ENV GNUPGHOME=/tmp/gnupg
5+
6+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
7+
RUN apk --no-cache add cmake
8+
RUN apk --no-cache add boost-dev
9+
RUN apk --no-cache add build-base
10+
RUN apk --no-cache add chrpath
11+
RUN apk --no-cache add file
12+
RUN apk --no-cache add gnupg
13+
RUN apk --no-cache add libevent-dev
14+
RUN apk --no-cache add libressl
15+
RUN apk --no-cache add libtool
16+
RUN apk --no-cache add linux-headers
17+
RUN apk --no-cache add sqlite-dev
18+
RUN apk --no-cache add zeromq-dev
19+
RUN mkdir -p ${GNUPGHOME}
20+
RUN set -ex \
21+
&& for key in \
22+
101598DC823C1B5F9A6624ABA5E0907A0380E6C3 \
23+
6A8F9C266528E25AEB1D7731C2371D91CB716EA7 \
24+
2840EAABF4BC9F0FFD716AFAFBAFCC46DE2D3FE2 \
25+
E86AE73439625BBEE306AAE6B66D427F873CB1A3 \
26+
A0083660F235A27000CD3C81CE6EC49945C17EA6 \
27+
F19F5FF2B0589EC341220045BA03F4DBE0C63FB4 \
28+
637DB1E23370F84AFF88CCE03152347D07DA627C \
29+
ED9BDF7AD6A55E232E84524257FF9BDBCC301009 \
30+
CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \
31+
152812300785C96444D3334D17565732E08E5E41 \
32+
C388F6961FB972A95678E327F62711DBDCA8AE56 \
33+
9DEAE0DC7063249FB05474681E4AED62986CD25D \
34+
D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \
35+
F4FC70F07310028424EFC20A8E4256593F177720 \
36+
E61773CD6E01040E2F1BD78CE7E2984B6289C93A \
37+
9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C \
38+
33C103B4B2794170546CCF7BCFB2C83C66CD792A \
39+
0CCBAAFD76A2ECE2CCD3141DE2FFD5B1D88CA97D \
40+
F2CFC4ABD0B99D837EEBB7D09B79B45691DB4173 \
41+
; do \
42+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
43+
gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \
44+
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
45+
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
46+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
47+
done
48+
49+
# Special variables just for release candidates, both should be empty for stable
50+
# releases.
51+
ARG RC
52+
ARG RC_DIR
53+
54+
ENV BITCOIN_VERSION=29.0
55+
ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}${RC}
56+
57+
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/${RC_DIR}SHA256SUMS
58+
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/${RC_DIR}SHA256SUMS.asc
59+
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/${RC_DIR}bitcoin-${BITCOIN_VERSION}${RC}.tar.gz
60+
RUN gpg --verify SHA256SUMS.asc SHA256SUMS
61+
RUN grep " bitcoin-${BITCOIN_VERSION}${RC}.tar.gz\$" SHA256SUMS | sha256sum -c -
62+
RUN tar -xzf *.tar.gz
63+
64+
WORKDIR /bitcoin-${BITCOIN_VERSION}${RC}
65+
66+
RUN cmake -B build \
67+
-DWITH_QRENCODE=OFF \
68+
-DBUILD_TESTS=OFF \
69+
-DWITH_ZMQ=ON \
70+
-DCMAKE_INSTALL_PREFIX=${BITCOIN_PREFIX}
71+
RUN cmake --build build -j4
72+
RUN cmake --install build
73+
RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli
74+
RUN strip ${BITCOIN_PREFIX}/bin/bitcoind
75+
76+
# Build stage for compiled artifacts
77+
FROM alpine
78+
79+
ARG UID=100
80+
ARG GID=101
81+
82+
LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \
83+
maintainer.1="Pedro Branco (@pedrobranco)" \
84+
maintainer.2="Rui Marinho (@ruimarinho)"
85+
86+
RUN addgroup bitcoin --gid ${GID} --system
87+
RUN adduser --uid ${UID} --system bitcoin --ingroup bitcoin
88+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
89+
RUN apk --no-cache add \
90+
boost-filesystem \
91+
boost-system \
92+
boost-thread \
93+
libevent \
94+
libzmq \
95+
shadow \
96+
sqlite-dev \
97+
su-exec
98+
99+
# Special variables just for release candidates, both should be empty for stable
100+
# releases.
101+
# ENV RC=
102+
# ENV RC_DIR=
103+
104+
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
105+
ENV BITCOIN_VERSION=29.0
106+
ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}${RC}
107+
ENV PATH=${BITCOIN_PREFIX}/bin:$PATH
108+
109+
COPY --from=bitcoin-core /opt /opt
110+
COPY docker-entrypoint.sh /entrypoint.sh
111+
112+
VOLUME ["/home/bitcoin/.bitcoin"]
113+
114+
EXPOSE 8332 8333 18332 18333 18444
115+
116+
ENTRYPOINT ["/entrypoint.sh"]
117+
118+
RUN bitcoind -version | grep "Bitcoin Core daemon version v${BITCOIN_VERSION}"
119+
120+
CMD ["bitcoind"]

29/alpine/docker-entrypoint.sh

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/sh
2+
set -e
3+
4+
if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then
5+
usermod -u "$UID" bitcoin
6+
fi
7+
8+
if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then
9+
groupmod -g "$GID" bitcoin
10+
fi
11+
12+
echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)"
13+
14+
if [ $(echo "$1" | cut -c1) = "-" ]; then
15+
echo "$0: assuming arguments for bitcoind"
16+
17+
set -- bitcoind "$@"
18+
fi
19+
20+
if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then
21+
mkdir -p "$BITCOIN_DATA"
22+
chmod 700 "$BITCOIN_DATA"
23+
# Fix permissions for home dir.
24+
chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)"
25+
# Fix permissions for bitcoin data dir.
26+
chown -R bitcoin:bitcoin "$BITCOIN_DATA"
27+
28+
echo "$0: setting data directory to $BITCOIN_DATA"
29+
30+
set -- "$@" -datadir="$BITCOIN_DATA"
31+
fi
32+
33+
if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then
34+
echo
35+
exec su-exec bitcoin "$@"
36+
fi
37+
38+
echo
39+
exec "$@"

29/docker-entrypoint.sh

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#!/bin/bash
2+
set -e
3+
4+
if [ -n "${UID+x}" ] && [ "${UID}" != "0" ]; then
5+
usermod -u "$UID" bitcoin
6+
fi
7+
8+
if [ -n "${GID+x}" ] && [ "${GID}" != "0" ]; then
9+
groupmod -g "$GID" bitcoin
10+
fi
11+
12+
echo "$0: assuming uid:gid for bitcoin:bitcoin of $(id -u bitcoin):$(id -g bitcoin)"
13+
14+
if [ $(echo "$1" | cut -c1) = "-" ]; then
15+
echo "$0: assuming arguments for bitcoind"
16+
17+
set -- bitcoind "$@"
18+
fi
19+
20+
if [ $(echo "$1" | cut -c1) = "-" ] || [ "$1" = "bitcoind" ]; then
21+
mkdir -p "$BITCOIN_DATA"
22+
chmod 700 "$BITCOIN_DATA"
23+
# Fix permissions for home dir.
24+
chown -R bitcoin:bitcoin "$(getent passwd bitcoin | cut -d: -f6)"
25+
# Fix permissions for bitcoin data dir.
26+
chown -R bitcoin:bitcoin "$BITCOIN_DATA"
27+
28+
echo "$0: setting data directory to $BITCOIN_DATA"
29+
30+
set -- "$@" -datadir="$BITCOIN_DATA"
31+
fi
32+
33+
if [ "$1" = "bitcoind" ] || [ "$1" = "bitcoin-cli" ] || [ "$1" = "bitcoin-tx" ]; then
34+
echo
35+
exec gosu bitcoin "$@"
36+
fi
37+
38+
echo
39+
exec "$@"

README.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ A bitcoin-core docker image with support for the following platforms:
99
[![lightninglabs/bitcoin-core][docker-pulls-image]][docker-hub-url] [![lightninglabs/bitcoin-core][docker-stars-image]][docker-hub-url] [![lightninglabs/bitcoin-core][docker-size-image]][docker-hub-url]
1010

1111
## Tags
12+
- `29.0`, `29` ([28/Dockerfile](https://github.com/lightninglabs/docker-bitcoin-core/blob/master/29/Dockerfile)) [**multi-arch**]
13+
- `2890-alpine`, `29-alpine` ([29/alpine/Dockerfile](https://github.com/lightninglabs/docker-bitcoin-core/blob/master/29/alpine/Dockerfile))
14+
1215
- `28.0`, `28` ([28/Dockerfile](https://github.com/lightninglabs/docker-bitcoin-core/blob/master/28/Dockerfile)) [**multi-arch**]
13-
- `28.0-alpine`, `28-alpine` ([27/alpine/Dockerfile](https://github.com/lightninglabs/docker-bitcoin-core/blob/master/28/alpine/Dockerfile))
16+
- `28.0-alpine`, `28-alpine` ([28/alpine/Dockerfile](https://github.com/lightninglabs/docker-bitcoin-core/blob/master/28/alpine/Dockerfile))
1417

1518
- `27.0`, `27` ([27/Dockerfile](https://github.com/lightninglabs/docker-bitcoin-core/blob/master/27/Dockerfile)) [**multi-arch**]
1619
- `27.0-alpine`, `27-alpine` ([27/alpine/Dockerfile](https://github.com/lightninglabs/docker-bitcoin-core/blob/master/27/alpine/Dockerfile))

0 commit comments

Comments
 (0)