2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-11 13:11:12 +00:00
loop/Dockerfile
Elle Mouton 208e1acc57 multi: bump minimum golang version to 1.15
Bump the minimum golang version to 1.15 in the go.mod file. The go
version is also updated in the Dockerfile and travis.yml file. This is
required so that the correct `errors.Is` method is used.
2021-04-20 11:57:02 +02:00

34 lines
891 B
Docker

FROM golang:1.15-alpine as builder
# Copy in the local repository to build from.
COPY . /go/src/github.com/lightningnetwork/loop
# 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).
ENV GO111MODULE on
# Install dependencies and install/build lnd.
RUN apk add --no-cache --update alpine-sdk \
git \
make \
&& cd /go/src/github.com/lightningnetwork/loop \
&& make 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 \
ca-certificates