You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
899 B

FROM golang:1.13-alpine as builder
# Copy in the local repository to build from.
COPY . /go/src/
# 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
# Explicitly turn on the use of modules (until this becomes the default).
# Install dependencies and install/build lnd.
RUN apk add --no-cache --update alpine-sdk \
git \
make \
&& cd /go/src/ \
&& go install ./...
# Start a new, final image to reduce size.
FROM alpine as final
# Expose lnd ports (server, rpc).
EXPOSE 8081 11010
# Copy the binaries and entrypoint from the builder image.
COPY --from=builder /go/bin/loopd /bin/
COPY --from=builder /go/bin/loop /bin/
# Add bash.
RUN apk add --no-cache \
bash \