2018-05-17 03:52:02 +03:00
|
|
|
FROM golang:1.10
|
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.
|
2017-07-04 19:48:53 +03:00
|
|
|
RUN go get -u github.com/Masterminds/glide
|
|
|
|
|
|
|
|
WORKDIR $GOPATH/src/github.com/roasbeef/btcd
|
|
|
|
RUN git clone https://github.com/roasbeef/btcd .
|
|
|
|
RUN glide install
|
|
|
|
RUN go install . ./cmd/...
|
2016-07-17 03:55:16 +03:00
|
|
|
|
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!
|
2018-02-07 06:11:11 +03:00
|
|
|
# Otherwise manually generated certificate will be overridden with shared
|
2017-01-12 03:12:32 +03:00
|
|
|
# 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
|
|
|
|
|