-
Notifications
You must be signed in to change notification settings - Fork 208
/
Dockerfile
46 lines (36 loc) · 1.56 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
FROM debian:stable-slim
ARG UID=101
ARG GID=101
LABEL maintainer.0="João Fonseca (@joaopaulofonseca)" \
maintainer.1="Pedro Branco (@pedrobranco)" \
maintainer.2="Rui Marinho (@ruimarinho)"
RUN groupadd --gid ${GID} bitcoin \
&& useradd --create-home --no-log-init -u ${UID} -g ${GID} bitcoin \
&& apt-get update -y \
&& apt-get install -y curl gnupg gosu \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV BITCOIN_VERSION=0.11.2
ENV BITCOIN_DATA=/home/bitcoin/.bitcoin
ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
RUN set -ex \
&& for key in \
01EA5486DE18A882D4C2684590C8019E36C2E964 \
; do \
gpg --batch --keyserver keyserver.ubuntu.com --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 -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/SHA256SUMS.asc \
&& curl -SLO https://bitcoin.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-linux64.tar.gz \
&& gpg --verify SHA256SUMS.asc \
&& grep " bitcoin-${BITCOIN_VERSION}-linux64.tar.gz\$" SHA256SUMS.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"]