-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
56 lines (45 loc) · 2.02 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
FROM debian:stable-slim
LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \
maintainer.1="Pedro Branco (@pedrobranco)" \
maintainer.2="Rui Marinho (@ruimarinho)" \
maintainer.3="Alex Disney (@adisney-up)"
# Key imports:
# gosu pubkey
# jasonbcox, bitcoin-abc dev pubkey
RUN useradd -r bitcoin \
&& apt-get update -y \
&& apt-get install -y curl gnupg \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& set -ex \
&& for key in \
B42F6819007F00F88E364FD4036A9C25BF357DD4 \
3BB16D00D9A6D281591BDC76E4486356E7A81D2C \
; do \
gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" || \
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys "$key" ; \
done
ENV GOSU_VERSION=1.10
RUN curl -o /usr/local/bin/gosu -fSL https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture) \
&& curl -o /usr/local/bin/gosu.asc -fSL https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-$(dpkg --print-architecture).asc \
&& gpg --verify /usr/local/bin/gosu.asc \
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu
ENV BITCOIN_ABC_DATA=/home/bitcoin/.bitcoin
ENV BITCOIN_ABC_VERSION=0.21.12
ENV BITCOIN_ABC_TAR=bitcoin-abc-${BITCOIN_ABC_VERSION}-x86_64-linux-gnu.tar.gz
ENV BITCOIN_ABC_ASC=jasonbcox-sha256sums.${BITCOIN_ABC_VERSION}.asc
ENV PATH=/opt/bitcoin-abc-${BITCOIN_ABC_VERSION}/bin:$PATH
RUN curl -SLO https://download.bitcoinabc.org/${BITCOIN_ABC_VERSION}/linux/${BITCOIN_ABC_TAR} \
&& curl -SLO https://download.bitcoinabc.org/${BITCOIN_ABC_VERSION}/${BITCOIN_ABC_ASC} \
&& gpg --verify ${BITCOIN_ABC_ASC} \
&& grep ${BITCOIN_ABC_TAR} ${BITCOIN_ABC_ASC} | sha256sum -c \
&& tar -xzf *.tar.gz -C /opt \
&& rm *.tar.gz *.asc
COPY docker-entrypoint.sh /entrypoint.sh
VOLUME ["/home/bitcoin/.bitcoin"]
EXPOSE 8332 8333 18332 18333 18444
ENTRYPOINT ["/entrypoint.sh"]
CMD ["bitcoind"]