forked from dougvk/lightning-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (32 loc) · 1.39 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
FROM debian:stretch-slim
RUN groupadd -r bitcoin && useradd -r -m -g bitcoin bitcoin
RUN set -ex \
&& apt-get update \
&& apt-get install -qq --no-install-recommends ca-certificates dirmngr gosu gpg wget \
&& rm -rf /var/lib/apt/lists/*
ENV BITCOIN_VERSION 0.15.1
ENV BITCOIN_URL https://bitcoin.org/bin/bitcoin-core-0.15.1/bitcoin-0.15.1-x86_64-linux-gnu.tar.gz
ENV BITCOIN_SHA256 387c2e12c67250892b0814f26a5a38f837ca8ab68c86af517f975a2a2710225b
ENV BITCOIN_ASC_URL https://bitcoin.org/bin/bitcoin-core-0.15.1/SHA256SUMS.asc
ENV BITCOIN_PGP_KEY 01EA5486DE18A882D4C2684590C8019E36C2E964
# install bitcoin binaries
RUN set -ex \
&& cd /tmp \
&& wget -qO bitcoin.tar.gz "$BITCOIN_URL" \
&& echo "$BITCOIN_SHA256 bitcoin.tar.gz" | sha256sum -c - \
&& gpg --keyserver keyserver.ubuntu.com --recv-keys "$BITCOIN_PGP_KEY" \
&& wget -qO bitcoin.asc "$BITCOIN_ASC_URL" \
&& gpg --verify bitcoin.asc \
&& tar -xzvf bitcoin.tar.gz -C /usr/local --strip-components=1 --exclude=*-qt \
&& rm -rf /tmp/*
# create data directory
ENV BITCOIN_DATA /mnt/data-part1
RUN mkdir "$BITCOIN_DATA" \
&& chown -R bitcoin:bitcoin "$BITCOIN_DATA" \
&& ln -sfn "$BITCOIN_DATA" /home/bitcoin/.bitcoin \
&& chown -h bitcoin:bitcoin /home/bitcoin/.bitcoin
VOLUME /mnt/data-part1
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 8332 8333 18332 18333
CMD ["bitcoind"]