docker: make 'lnd' dockerfile download project from github rather than mount it localy
This commit is contained in:
parent
0325b0c77a
commit
49df1b0737
@ -2,18 +2,24 @@ FROM golang:1.7
|
|||||||
|
|
||||||
MAINTAINER Olaoluwa Osuntokun <laolu@lightning.network>
|
MAINTAINER Olaoluwa Osuntokun <laolu@lightning.network>
|
||||||
|
|
||||||
# TODO(roasbeef): just mount a volume from the build context to the GOPATH?
|
# Expose lnd ports (server, rpc).
|
||||||
ADD . /go/src/github.com/lightningnetwork/lnd
|
EXPOSE 10011 10009
|
||||||
WORKDIR /go/src/github.com/lightningnetwork/lnd
|
|
||||||
|
|
||||||
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
|
# Force Go to use the cgo based DNS resolver. This is required to ensure DNS
|
||||||
# queries required to connect to linked containers succeed.
|
# queries required to connect to linked containers succeed.
|
||||||
ENV GODEBUG netdns=cgo
|
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/...
|
RUN go install . ./cmd/...
|
||||||
|
|
||||||
# Expose lnd ports (server, rpc).
|
|
||||||
EXPOSE 10011 10009
|
|
||||||
|
|
||||||
COPY "docker/lnd/start-lnd.sh" .
|
COPY "docker/lnd/start-lnd.sh" .
|
||||||
|
Loading…
Reference in New Issue
Block a user