2016-08-30 01:17:48 +03:00
|
|
|
FROM golang:1.7
|
2016-07-17 03:55:16 +03:00
|
|
|
|
|
|
|
MAINTAINER Olaoluwa Osuntokun <laolu@lightning.network>
|
|
|
|
|
2017-01-12 03:12:32 +03:00
|
|
|
# Expose mainnet ports (server, rpc)
|
|
|
|
EXPOSE 8333 8334
|
|
|
|
|
|
|
|
# Expose testnet ports (server, rpc)
|
|
|
|
EXPOSE 18333 18334
|
|
|
|
|
|
|
|
# Expose simnet ports (server, rpc)
|
|
|
|
EXPOSE 18555 18556
|
|
|
|
|
|
|
|
# Expose segnet ports (server, rpc)
|
|
|
|
EXPOSE 28901 28902
|
|
|
|
|
2016-07-17 03:55:16 +03:00
|
|
|
# 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/...
|
|
|
|
|
2017-01-12 03:12:32 +03:00
|
|
|
RUN mkdir "/rpc" "/root/.btcd" "/root/.btcctl"
|
|
|
|
RUN touch "/root/.btcd/btcd.conf"
|
2016-07-17 03:55:16 +03:00
|
|
|
|
2017-01-12 03:12:32 +03:00
|
|
|
# Manually generate certificate and add all domains, it is needed to connect
|
|
|
|
# "btcctl" and "lnd" to "btcd" over docker links.
|
|
|
|
RUN "/go/bin/gencerts" --host="*" --directory="/rpc" --force
|
2016-07-17 03:55:16 +03:00
|
|
|
|
2017-01-12 03:12:32 +03:00
|
|
|
# Create a volume to house pregenerated RPC credentials. This will be
|
|
|
|
# shared with any lnd, btcctl containers so they can securely query btcd's RPC
|
|
|
|
# server.
|
|
|
|
# You should NOT do this before certificate generation!
|
|
|
|
# Otherwise manually generated certificate will be overriden with shared
|
|
|
|
# mounted volume! For more info read dockerfile "VOLUME" documentation.
|
2016-08-30 01:17:48 +03:00
|
|
|
VOLUME ["/rpc"]
|
|
|
|
|
2017-01-12 03:12:32 +03:00
|
|
|
COPY "start-btcctl.sh" .
|
|
|
|
COPY "start-btcd.sh" .
|
2017-01-22 17:44:15 +03:00
|
|
|
|
|
|
|
RUN chmod +x start-btcctl.sh
|
|
|
|
RUN chmod +x start-btcd.sh
|
|
|
|
|