Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c5c4388

Browse files
committed
Add bitcoin core v27.0 (rc1)
1 parent 6200007 commit c5c4388

File tree

5 files changed

+300
-2
lines changed

5 files changed

+300
-2
lines changed

‎27/Dockerfile‎

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
ARG TARGETPLATFORM
18+
ENV BITCOIN_VERSION=27.0
19+
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
20+
ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}rc1/bin:$PATH
21+
22+
RUN set -ex \
23+
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \
24+
&& if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \
25+
&& if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi \
26+
&& for key in \
27+
101598DC823C1B5F9A6624ABA5E0907A0380E6C3 \
28+
F2CFC4ABD0B99D837EEBB7D09B79B45691DB4173 \
29+
152812300785C96444D3334D17565732E08E5E41 \
30+
0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \
31+
C060A6635913D98A3587D7DB1C2491FFEB0EF770 \
32+
CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \
33+
F19F5FF2B0589EC341220045BA03F4DBE0C63FB4 \
34+
F4FC70F07310028424EFC20A8E4256593F177720 \
35+
D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \
36+
287AE4CA1187C68C08B49CB2D11BD4F33F1DB499 \
37+
9DEAE0DC7063249FB05474681E4AED62986CD25D \
38+
6A8F9C266528E25AEB1D7731C2371D91CB716EA7 \
39+
28E72909F1717FE9607754F8A7BEB2621678D37D \
40+
616516B8EB6ED02882FC4A7A8ADCB558C4F33D65 \
41+
ED9BDF7AD6A55E232E84524257FF9BDBCC301009 \
42+
C388F6961FB972A95678E327F62711DBDCA8AE56 \
43+
; do \
44+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
45+
gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \
46+
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
47+
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
48+
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
49+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
50+
done \
51+
&& curl -sSL https://raw.githubusercontent.com/bitcoin-core/guix.sigs/main/builder-keys/m3dwards.gpg | gpg --import \
52+
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/test.rc1/bitcoin-${BITCOIN_VERSION}rc1-${TARGETPLATFORM}.tar.gz \
53+
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/test.rc1/SHA256SUMS \
54+
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/test.rc1/SHA256SUMS.asc \
55+
&& gpg --verify SHA256SUMS.asc SHA256SUMS \
56+
&& grep " bitcoin-${BITCOIN_VERSION}rc1-${TARGETPLATFORM}.tar.gz" SHA256SUMS | sha256sum -c - \
57+
&& tar -xzf *.tar.gz -C /opt \
58+
&& rm *.tar.gz *.asc \
59+
&& rm -rf /opt/bitcoin-${BITCOIN_VERSION}rc1/bin/bitcoin-qt
60+
61+
COPY docker-entrypoint.sh /entrypoint.sh
62+
63+
VOLUME ["/home/bitcoin/.bitcoin"]
64+
65+
EXPOSE 8332 8333 18332 18333 18443 18444 38333 38332
66+
67+
ENTRYPOINT ["/entrypoint.sh"]
68+
69+
RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}"
70+
71+
CMD ["bitcoind"]

‎27/alpine/Dockerfile‎

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# Build stage for BerkeleyDB
2+
FROM alpine as berkeleydb
3+
4+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
5+
RUN apk --no-cache add autoconf
6+
RUN apk --no-cache add automake
7+
RUN apk --no-cache add build-base
8+
RUN apk --no-cache add libressl
9+
10+
ENV BERKELEYDB_VERSION=db-4.8.30.NC
11+
ENV BERKELEYDB_PREFIX=/opt/${BERKELEYDB_VERSION}
12+
13+
RUN wget https://download.oracle.com/berkeley-db/${BERKELEYDB_VERSION}.tar.gz
14+
RUN tar -xzf *.tar.gz
15+
RUN sed s/__atomic_compare_exchange/__atomic_compare_exchange_db/g -i ${BERKELEYDB_VERSION}/dbinc/atomic.h
16+
RUN mkdir -p ${BERKELEYDB_PREFIX}
17+
18+
WORKDIR /${BERKELEYDB_VERSION}/build_unix
19+
20+
RUN ../dist/configure --enable-cxx --disable-shared --with-pic --prefix=${BERKELEYDB_PREFIX} --build=aarch64-unknown-linux-gnu
21+
RUN make -j4
22+
RUN make install
23+
RUN rm -rf ${BERKELEYDB_PREFIX}/docs
24+
25+
# Build stage for Bitcoin Core
26+
FROM alpine as bitcoin-core
27+
28+
COPY --from=berkeleydb /opt /opt
29+
30+
ENV GNUPGHOME=/tmp/gnupg
31+
32+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
33+
RUN apk --no-cache add autoconf
34+
RUN apk --no-cache add automake
35+
RUN apk --no-cache add boost-dev
36+
RUN apk --no-cache add build-base
37+
RUN apk --no-cache add chrpath
38+
RUN apk --no-cache add file
39+
RUN apk --no-cache add gnupg
40+
RUN apk --no-cache add libevent-dev
41+
RUN apk --no-cache add libressl
42+
RUN apk --no-cache add libtool
43+
RUN apk --no-cache add linux-headers
44+
RUN apk --no-cache add sqlite-dev
45+
RUN apk --no-cache add zeromq-dev
46+
RUN mkdir -p ${GNUPGHOME}
47+
RUN set -ex \
48+
&& for key in \
49+
101598DC823C1B5F9A6624ABA5E0907A0380E6C3 \
50+
F2CFC4ABD0B99D837EEBB7D09B79B45691DB4173 \
51+
152812300785C96444D3334D17565732E08E5E41 \
52+
0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \
53+
C060A6635913D98A3587D7DB1C2491FFEB0EF770 \
54+
CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \
55+
F19F5FF2B0589EC341220045BA03F4DBE0C63FB4 \
56+
F4FC70F07310028424EFC20A8E4256593F177720 \
57+
D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \
58+
287AE4CA1187C68C08B49CB2D11BD4F33F1DB499 \
59+
9DEAE0DC7063249FB05474681E4AED62986CD25D \
60+
6A8F9C266528E25AEB1D7731C2371D91CB716EA7 \
61+
28E72909F1717FE9607754F8A7BEB2621678D37D \
62+
616516B8EB6ED02882FC4A7A8ADCB558C4F33D65 \
63+
ED9BDF7AD6A55E232E84524257FF9BDBCC301009 \
64+
C388F6961FB972A95678E327F62711DBDCA8AE56 \
65+
; do \
66+
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
67+
gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \
68+
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
69+
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
70+
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
71+
done \
72+
&& wget -O- https://raw.githubusercontent.com/bitcoin-core/guix.sigs/main/builder-keys/m3dwards.gpg | gpg --import
73+
74+
ENV BITCOIN_VERSION=27.0
75+
ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}rc1
76+
77+
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/test.rc1/SHA256SUMS
78+
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/test.rc1/SHA256SUMS.asc
79+
RUN wget https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/test.rc1/bitcoin-${BITCOIN_VERSION}rc1.tar.gz
80+
RUN gpg --verify SHA256SUMS.asc SHA256SUMS
81+
RUN grep " bitcoin-${BITCOIN_VERSION}rc1.tar.gz\$" SHA256SUMS | sha256sum -c -
82+
RUN tar -xzf *.tar.gz
83+
84+
WORKDIR /bitcoin-${BITCOIN_VERSION}rc1
85+
86+
RUN sed -i s:sys/fcntl.h:fcntl.h: src/compat/compat.h
87+
RUN ./autogen.sh
88+
RUN ./configure LDFLAGS=-L`ls -d /opt/db*`/lib/ CPPFLAGS=-I`ls -d /opt/db*`/include/ \
89+
--prefix=${BITCOIN_PREFIX} \
90+
--mandir=/usr/share/man \
91+
--disable-tests \
92+
--disable-bench \
93+
--disable-ccache \
94+
--with-gui=no \
95+
--with-utils \
96+
--with-libs \
97+
--with-sqlite=yes \
98+
--with-daemon
99+
RUN make -j4
100+
RUN make install
101+
RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-cli
102+
RUN strip ${BITCOIN_PREFIX}/bin/bitcoin-tx
103+
RUN strip ${BITCOIN_PREFIX}/bin/bitcoind
104+
RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.a
105+
RUN strip ${BITCOIN_PREFIX}/lib/libbitcoinconsensus.so.0.0.0
106+
107+
# Build stage for compiled artifacts
108+
FROM alpine
109+
110+
ARG UID=100
111+
ARG GID=101
112+
113+
LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \
114+
maintainer.1="Pedro Branco (@pedrobranco)" \
115+
maintainer.2="Rui Marinho (@ruimarinho)"
116+
117+
RUN addgroup bitcoin --gid ${GID} --system
118+
RUN adduser --uid ${UID} --system bitcoin --ingroup bitcoin
119+
RUN sed -i 's/http\:\/\/dl-cdn.alpinelinux.org/https\:\/\/alpine.global.ssl.fastly.net/g' /etc/apk/repositories
120+
RUN apk --no-cache add \
121+
boost-filesystem \
122+
boost-system \
123+
boost-thread \
124+
libevent \
125+
libzmq \
126+
shadow \
127+
sqlite-dev \
128+
su-exec
129+
130+
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
131+
ENV BITCOIN_VERSION=27.0
132+
ENV BITCOIN_PREFIX=/opt/bitcoin-${BITCOIN_VERSION}rc1
133+
ENV PATH=${BITCOIN_PREFIX}/bin:$PATH
134+
135+
COPY --from=bitcoin-core /opt /opt
136+
COPY docker-entrypoint.sh /entrypoint.sh
137+
138+
VOLUME ["/home/bitcoin/.bitcoin"]
139+
140+
EXPOSE 8332 8333 18332 18333 18444
141+
142+
ENTRYPOINT ["/entrypoint.sh"]
143+
144+
RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}"
145+
146+
CMD ["bitcoind"]

‎27/alpine/docker-entrypoint.sh‎

Lines changed: 39 additions & 0 deletions
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 "$@"

‎27/docker-entrypoint.sh‎

Lines changed: 39 additions & 0 deletions
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‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
# ruimarinho/bitcoin-core
1+
# lightninglabs/bitcoin-core
22

33
A bitcoin-core docker image with support for the following platforms:
44

55
* `amd64` (x86_64)
66
* `arm32v7` (armv7)
77
* `arm64` (aarch64, armv8)
88

9-
[![ruimarinho/bitcoin-core][docker-pulls-image]][docker-hub-url] [![ruimarinho/bitcoin-core][docker-stars-image]][docker-hub-url] [![ruimarinho/bitcoin-core][docker-size-image]][docker-hub-url]
9+
[![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
1212

13+
- `27.0rc1`, `27` ([27/Dockerfile](https://github.com/lightninglabs/docker-bitcoin-core/blob/master/27/Dockerfile)) [**multi-arch**]
14+
- `27.0rc1-alpine`, `27-alpine` ([27/alpine/Dockerfile](https://github.com/lightninglabs/docker-bitcoin-core/blob/master/27/alpine/Dockerfile))
15+
1316
- `26.0`, `26` ([26/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/25/Dockerfile)) [**multi-arch**]
1417
- `26.0-alpine`, `26-alpine` ([26/alpine/Dockerfile](https://github.com/ruimarinho/docker-bitcoin-core/blob/master/25/alpine/Dockerfile))
1518

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /