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

  1. FROM golang:1.13-alpine as builder
  2. # Copy in the local repository to build from.
  3. COPY . /go/src/github.com/lightningnetwork/loop
  4. # Force Go to use the cgo based DNS resolver. This is required to ensure DNS
  5. # queries required to connect to linked containers succeed.
  6. ENV GODEBUG netdns=cgo
  7. # Explicitly turn on the use of modules (until this becomes the default).
  8. ENV GO111MODULE on
  9. # Install dependencies and install/build lnd.
  10. RUN apk add --no-cache --update alpine-sdk \
  11. git \
  12. make \
  13. && cd /go/src/github.com/lightningnetwork/loop/cmd \
  14. && go install ./...
  15. # Start a new, final image to reduce size.
  16. FROM alpine as final
  17. # Expose lnd ports (server, rpc).
  18. EXPOSE 8081 11010
  19. # Copy the binaries and entrypoint from the builder image.
  20. COPY --from=builder /go/bin/loopd /bin/
  21. COPY --from=builder /go/bin/loop /bin/
  22. # Add bash.
  23. RUN apk add --no-cache \
  24. bash \
  25. ca-certificates