2
0
mirror of https://github.com/lnbook/lnbook synced 2024-11-06 21:20:29 +00:00
lnbook/code/docker/bitcoind/Dockerfile

47 lines
1.3 KiB
Docker
Raw Normal View History

2020-07-24 20:24:18 +00:00
FROM ubuntu:20.04 AS bitcoind-base
2020-06-14 17:45:43 +00:00
RUN apt update && apt install -yqq \
curl gosu jq bash-completion
ENV BITCOIND_VERSION 0.20.0
# Install binaries for Bitcoin Core
ADD https://bitcoincore.org/bin/bitcoin-core-${BITCOIND_VERSION}/bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz /usr/local
RUN cd /usr/local/ \
&& tar -zxf bitcoin-${BITCOIND_VERSION}-x86_64-linux-gnu.tar.gz \
&& cd bitcoin-${BITCOIND_VERSION} \
&& install bin/* /usr/local/bin \
&& install include/* /usr/local/include \
&& install -v lib/* /usr/local/lib
ENV GH_URL https://raw.githubusercontent.com/bitcoin/bitcoin/master/
ENV BC /usr/share/bash-completion/completions/
ADD $GH_URL/contrib/bitcoin-cli.bash-completion $BC/bitcoin-cli
ADD $GH_URL/contrib/bitcoind.bash-completion $BC/bitcoind
ADD $GH_URL/contrib/bitcoin-tx.bash-completion $BC/bitcoin-tx
2020-06-18 21:22:44 +00:00
FROM bitcoind-base AS bitcoind
2020-03-05 18:15:41 +00:00
ADD bitcoind /bitcoind
2020-06-15 14:40:11 +00:00
RUN ln -s /bitcoind /root/.
ADD bashrc /root/.bashrc
ADD bitcoind-entrypoint.sh /usr/local/bin
RUN chmod +x /usr/local/bin/bitcoind-entrypoint.sh
ADD mine.sh /usr/local/bin
RUN chmod +x /usr/local/bin/mine.sh
2020-03-05 18:15:41 +00:00
# bitcoind P2P
EXPOSE 18444/tcp
# bitcoind regtest RPC
EXPOSE 18443/tcp
# zmqpubrawblock
EXPOSE 12005/tcp
# zmqpubrawtx
EXPOSE 12006/tcp
2020-03-05 18:15:41 +00:00
WORKDIR /bitcoind
2020-06-15 14:40:11 +00:00
ENTRYPOINT ["/usr/local/bin/bitcoind-entrypoint.sh"]
# Mine new block every 10 seconds
CMD ["/usr/local/bin/mine.sh"]