-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (29 loc) · 912 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM golang:1.10-alpine as builder
MAINTAINER CoBloX Team <[email protected]>
RUN apk add --no-cache \
git \
make
# 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 get -u github.com/golang/dep/cmd/dep
RUN go get -d github.com/lightningnetwork/lnd
RUN cd $GOPATH/src/github.com/lightningnetwork/lnd \
&& git checkout v0.5.1-beta \
&& make \
&& make install
# Start a new, final image to reduce size.
FROM alpine as final
# Expose lnd ports (server, rpc).
EXPOSE 9735 10009
# Copy the binaries and entrypoint from the builder image.
COPY --from=builder /go/bin/lncli /bin/
COPY --from=builder /go/bin/lnd /bin/
# Add bash & curl.
RUN apk add --no-cache \
bash \
curl
# Copy the entrypoint script.
COPY start-lnd.sh .
COPY wait-for-backend.sh .
RUN chmod +x start-lnd.sh