docker: make 'lnd' dockerfile download project from github rather than mount it localy

This commit is contained in:
Andrey Samokhvalov 2017-01-18 02:33:01 +03:00 committed by Olaoluwa Osuntokun
parent 0325b0c77a
commit 49df1b0737

@ -2,18 +2,24 @@ FROM golang:1.7
MAINTAINER Olaoluwa Osuntokun <laolu@lightning.network>
# TODO(roasbeef): just mount a volume from the build context to the GOPATH?
ADD . /go/src/github.com/lightningnetwork/lnd
WORKDIR /go/src/github.com/lightningnetwork/lnd
# Expose lnd ports (server, rpc).
EXPOSE 10011 10009
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
# queries required to connect to linked containers succeed.
ENV GODEBUG netdns=cgo
RUN go build
# Install glide to manage vendor.
RUN go get -u github.com/Masterminds/glide
# Grab and install the latest version of lnd and all related dependencies.
RUN git clone https://github.com/lightningnetwork/lnd $GOPATH/src/github.com/lightningnetwork/lnd
# Make lnd folder default.
WORKDIR $GOPATH/src/github.com/lightningnetwork/lnd
# Instll dependency and install/build lnd.
RUN glide install
RUN go install . ./cmd/...
# Expose lnd ports (server, rpc).
EXPOSE 10011 10009
COPY "docker/lnd/start-lnd.sh" .