lnd.xprv/docker/lnd/Dockerfile

37 lines
928 B
Docker
Raw Normal View History

FROM golang:1.11-alpine as builder
MAINTAINER Olaoluwa Osuntokun <lightning.engineering>
2018-05-02 06:55:40 +03:00
# 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
2018-05-02 06:55:40 +03:00
# Install dependencies and install/build lnd.
RUN apk add --no-cache --update alpine-sdk \
2018-05-02 06:55:40 +03:00
git \
make \
&& cd /go/src/github.com/lightningnetwork/lnd \
2018-05-19 06:47:44 +03:00
&& make \
&& make install
2018-05-02 06:55:40 +03:00
# Start a new, final image to reduce size.
FROM alpine as final
2018-05-02 06:55:40 +03:00
# Expose lnd ports (server, rpc).
EXPOSE 9735 10009
2018-05-02 06:55:40 +03:00
# Copy the binaries and entrypoint from the builder image.
2018-05-19 06:47:44 +03:00
COPY --from=builder /go/bin/lncli /bin/
COPY --from=builder /go/bin/lnd /bin/
2018-05-02 06:55:40 +03:00
# Add bash.
RUN apk add --no-cache \
bash
2018-05-02 06:55:40 +03:00
# Copy the entrypoint script.
COPY "docker/lnd/start-lnd.sh" .
RUN chmod +x start-lnd.sh