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

46 lines
1.2 KiB
Docker
Raw Normal View History

FROM ubuntu:18.04 AS bitcoind-base
# RUN apk update \
# && apk upgrade \
# && apk add bash bash-completion
RUN apt update \
&& apt install -y \
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
ADD bashrc /root/.bashrc
FROM bitcoind-base AS bitcoind-regtest
2020-03-05 18:15:41 +00:00
ADD bitcoind /bitcoind
2020-06-07 20:55:59 +00:00
RUN ln -s /bitcoind /root/.bitcoin
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
CMD /bin/bash /bitcoind/bitcoind-start.sh \
&& /bin/bash /bitcoind/mine.sh