lnd.xprv/Dockerfile
Geoff Taylor b3d3ba8612
Root Dockerfile now builds subservers
Root Dockerfile now builds subservers required for Loop functionality.
2019-05-09 15:16:36 +01:00

38 lines
1.0 KiB
Docker

FROM golang:alpine as builder
# 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
# Install dependencies and build the binaries.
RUN apk add --no-cache --update alpine-sdk \
git \
make \
gcc \
&& git clone https://github.com/lightningnetwork/lnd /go/src/github.com/lightningnetwork/lnd \
&& cd /go/src/github.com/lightningnetwork/lnd \
&& make \
&& make install tags="signrpc walletrpc chainrpc invoicesrpc"
# Start a new, final image.
FROM alpine as final
# Define a root volume for data persistence.
VOLUME /root/.lnd
# Add bash and ca-certs, for quality of life and SSL-related reasons.
RUN apk --no-cache add \
bash \
ca-certificates
# Copy the binaries from the builder image.
COPY --from=builder /go/bin/lncli /bin/
COPY --from=builder /go/bin/lnd /bin/
# Expose lnd ports (p2p, rpc).
EXPOSE 9735 10009
# Specify the start command and entrypoint as the lnd daemon.
ENTRYPOINT ["lnd"]
CMD ["lnd"]