You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

45 lines
1.5 KiB
Docker

FROM phusion/baseimage:latest
RUN groupadd -r bitcoin && useradd -r -m -g bitcoin bitcoin
ENV BITCOIN_VERSION 0.13.2
ENV BITCOIN_URL https://bitcoin.org/bin/bitcoin-core-0.13.2/bitcoin-0.13.2-x86_64-linux-gnu.tar.gz
ENV BITCOIN_SHA256 29215a7fe7430224da52fc257686d2d387546eb8acd573a949128696e8761149
ENV BITCOIN_ASC_URL https://bitcoin.org/bin/bitcoin-core-0.13.2/SHA256SUMS.asc
ENV BITCOIN_PGP_KEY 01EA5486DE18A882D4C2684590C8019E36C2E964
RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates wget \
&& rm -rf /var/lib/apt/lists/* \
# grab gosu for easy step-down from root
&& gpg --keyserver pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 \
&& wget -qO /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture)" \
&& wget -qO /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/1.7/gosu-$(dpkg --print-architecture).asc" \
&& gpg --verify /usr/local/bin/gosu.asc \
&& rm /usr/local/bin/gosu.asc \
&& chmod +x /usr/local/bin/gosu \
# Add bitcoin ppa
&& add-apt-repository -y ppa:bitcoin/bitcoin \
&& apt-get update \
# install bitcoin binaries
&& apt-get install -y bitcoind \
# remove build dependencies
&& apt-get purge -y --auto-remove wget
ENV BITCOIN_DATA /data
RUN mkdir $BITCOIN_DATA \
&& chown bitcoin:bitcoin $BITCOIN_DATA \
&& ln -s $BITCOIN_DATA /home/bitcoin/.bitcoin
VOLUME /data
COPY docker-entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
EXPOSE 8333 18333
CMD ["bitcoind"]