-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (23 loc) · 1011 Bytes
/
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
FROM debian:stable-slim
ARG BITCOIN_VERSION
ENV PATH=/opt/bitcoin-${BITCOIN_VERSION}/bin:$PATH
RUN apt-get update -y \
&& apt-get install -y curl gosu \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN SYS_ARCH="$(uname -m)" \
&& curl -SLO https://bitcoincore.org/bin/bitcoin-core-${BITCOIN_VERSION}/bitcoin-${BITCOIN_VERSION}-${SYS_ARCH}-linux-gnu.tar.gz \
&& tar -xzf *.tar.gz -C /opt \
&& rm *.tar.gz
RUN curl -SLO https://raw.githubusercontent.com/bitcoin/bitcoin/master/contrib/bitcoin-cli.bash-completion \
&& mkdir /etc/bash_completion.d \
&& mv bitcoin-cli.bash-completion /etc/bash_completion.d/ \
&& curl -SLO https://raw.githubusercontent.com/scop/bash-completion/master/bash_completion \
&& mv bash_completion /usr/share/bash-completion/
COPY docker-entrypoint.sh /entrypoint.sh
COPY bashrc /home/bitcoin/.bashrc
RUN chmod a+x /entrypoint.sh
VOLUME ["/home/bitcoin/.bitcoin"]
EXPOSE 8332 28332 28333
ENTRYPOINT ["/entrypoint.sh"]
CMD ["bitcoind"]