lnd.xprv/docker/lnd/Dockerfile
Lightning Koala dcff77b63a
Update go version to 1.13
New go minimum version required is 1.13 as per [this change](https://github.com/lightningnetwork/lnd/pull/34589).
Docker build will fail due to missing trimpath.
2019-09-18 12:29:40 +01:00

37 lines
984 B
Docker

FROM golang:1.13-alpine as builder
MAINTAINER Olaoluwa Osuntokun <lightning.engineering>
# Copy in the local repository to build from.
COPY . /go/src/github.com/lightningnetwork/lnd
# 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 install/build lnd.
RUN apk add --no-cache --update alpine-sdk \
git \
make \
&& cd /go/src/github.com/lightningnetwork/lnd \
&& make \
&& make install tags="signrpc walletrpc chainrpc invoicesrpc routerrpc"
# 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.
RUN apk add --no-cache \
bash
# Copy the entrypoint script.
COPY "docker/lnd/start-lnd.sh" .
RUN chmod +x start-lnd.sh