-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
68 lines (58 loc) · 2.97 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# copied from: https://github.com/ruimarinho/docker-bitcoin-core/tree/master/23
FROM debian:bullseye-slim
LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \
maintainer.1="Pedro Branco (@pedrobranco)" \
maintainer.2="Rui Marinho (@ruimarinho)"
RUN useradd -r bitcoin \
&& apt-get update -y \
&& apt-get install -y curl gnupg gosu \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ARG TARGETPLATFORM
ENV BITCOIN_VERSION=23.0
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
RUN set -ex \
&& if [ "${TARGETPLATFORM}" = "linux/amd64" ]; then export TARGETPLATFORM=x86_64-linux-gnu; fi \
&& if [ "${TARGETPLATFORM}" = "linux/arm64" ]; then export TARGETPLATFORM=aarch64-linux-gnu; fi \
&& if [ "${TARGETPLATFORM}" = "linux/arm/v7" ]; then export TARGETPLATFORM=arm-linux-gnueabihf; fi \
&& for key in \
152812300785C96444D3334D17565732E08E5E41 \
0AD83877C1F0CD1EE9BD660AD7CC770B81FD22A8 \
590B7292695AFFA5B672CBB2E13FC145CD3F4304 \
28F5900B1BB5D1A4B6B6D1A9ED357015286A333D \
637DB1E23370F84AFF88CCE03152347D07DA627C \
CFB16E21C950F67FA95E558F2EEB9F5CC09526C1 \
F4FC70F07310028424EFC20A8E4256593F177720 \
D1DBF2C4B96F2DEBF4C16654410108112E7EA81F \
287AE4CA1187C68C08B49CB2D11BD4F33F1DB499 \
F9A8737BF4FF5C89C903DF31DD78544CF91B1514 \
9DEAE0DC7063249FB05474681E4AED62986CD25D \
E463A93F5F3117EEDE6C7316BD02942421F4889F \
9D3CC86A72F8494342EA5FD10A41BDC3F4FAFF1C \
4DAF18FE948E7A965B30F9457E296D555E7F63A7 \
28E72909F1717FE9607754F8A7BEB2621678D37D \
74E2DEF5D77260B98BC19438099BAD163C70FBFA \
; do \
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key" || \
gpg --batch --keyserver keys.openpgp.org --recv-keys "$key" || \
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --batch --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
done \
&& curl -SL https://raw.githubusercontent.com/Kvaciral/kvaciral/main/kvaciral.asc | gpg --import \
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz \
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS \
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \
&& gpg --verify SHA256SUMS.asc SHA256SUMS \
&& grep " bitcoin-${BITCOIN_VERSION}-${TARGETPLATFORM}.tar.gz" SHA256SUMS | sha256sum -c - \
&& tar -xzf *.tar.gz -C /opt \
&& rm *.tar.gz *.asc \
&& rm -rf /opt/bitcoin-${BITCOIN_VERSION}/bin/bitcoin-qt
COPY docker-entrypoint.sh /entrypoint.sh
VOLUME ["/home/bitcoin/.bitcoin"]
EXPOSE 8332 8333 18332 18333 18443 18444 38333 38332
ENTRYPOINT ["/entrypoint.sh"]
RUN bitcoind -version | grep "Bitcoin Core version v${BITCOIN_VERSION}"
CMD ["bitcoind"]