lnd.xprv/docker/btcd/Dockerfile
Olaoluwa Osuntokun 62fb3a9fee
docker: add single command docker build+run for btcd+lnd
This commit adds two Dockerfiles, along with a docker-compose file
which links the two docker files together allowing for single-command
deployment.

Using the docker-compose file, two containers are deployed. One running
btcd, and the other running lnd. Both containers share the same shared
volume mounted to the file system in order to allow land to read btcd’s
certificates for the TLS RPC connections.

Additionally, the btcd instance comes will an automatic RPC
configuration generated allowing one to use btcctl out of the box via
calls to “docker-compose exec btcctl …”.
2016-07-16 17:55:29 -07:00

26 lines
767 B
Docker

FROM golang:1.6.2
MAINTAINER Olaoluwa Osuntokun <laolu@lightning.network>
# Grab and install the latest version of roasbeef's fork of btcd and all
# related dependencies.
RUN go get -u -v github.com/roasbeef/btcd/...
# Expose the mainnet, testnet, simnet, and segnet listening ports.
EXPOSE 8333 18333 18335 28901
# Expose the mainnet, testnet, simnet, and segnet rpc ports.
EXPOSE 8333 18333 18336 28902
VOLUME ["/data"]
RUN mkdir /root/.btcd && mkdir /root/.btcctl
# Generate an automatic RPC conf.
ADD initrpc.go /root/
WORKDIR /root
RUN go build -o gen-config && ./gen-config
# TODO(roabeef): ENV or prog to parse --no-tls?
ENTRYPOINT ["/go/bin/btcd", "--datadir=/data", "--logdir=/data", "--segnet", "--rpccert=/data/rpc.cert", "--rpckey=/data/rpc.key"]