一、bch镜像生成
- 1.下载基础镜像
docker pull buildpack-deps:jessie-curl
- 2.编写Dockerfile
# vim Dockerfile
FROM buildpack-deps:jessie-curl
RUN wget -O bitcoin-abc.tar.gz https://download.bitcoinabc.org/latest/linux/bitcoin-abc-0.22.9-x86_64-linux-gnu.tar.gz \
&& tar -xzvf bitcoin-abc.tar.gz \
&& cd bitcoin-abc-0.22.9/bin \
&& mv bitcoin-cli bitcoin-tx bitcoind /usr/local/bin \
&& cd / \
&& rm -Rfv bitcoin*
EXPOSE 8332 8333 18332 18333 18443 18444
WORKDIR /root/.bitcoin
ENTRYPOINT ["bitcoind"]
注:EXPOSE用来指定端口,使容器内的应用可以通过端口和外界交互。rpc远程调用协议的端口