/ dev.Dockerfile
dev.Dockerfile
1 # If you change this please also update GO_VERSION in Makefile (then run 2 # `make lint` to see where else it needs to be updated as well). 3 FROM golang:1.25.5-alpine AS builder 4 5 LABEL maintainer="Olaoluwa Osuntokun <laolu@lightning.engineering>" 6 7 # Force Go to use the cgo based DNS resolver. This is required to ensure DNS 8 # queries required to connect to linked containers succeed. 9 ENV GODEBUG netdns=cgo 10 11 # Install dependencies. 12 RUN apk add --no-cache --update alpine-sdk \ 13 bash \ 14 git \ 15 make 16 17 # Copy in the local repository to build from. 18 COPY . /go/src/github.com/lightningnetwork/lnd 19 20 # Install/build lnd. 21 RUN cd /go/src/github.com/lightningnetwork/lnd \ 22 && make \ 23 && make install-all tags="signrpc walletrpc chainrpc invoicesrpc peersrpc kvdb_sqlite" 24 25 # Start a new, final image to reduce size. 26 FROM alpine AS final 27 28 # Expose lnd ports (server, rpc). 29 EXPOSE 9735 10009 30 31 # Copy the binaries and entrypoint from the builder image. 32 COPY --from=builder /go/bin/lncli /bin/ 33 COPY --from=builder /go/bin/lnd /bin/ 34 35 # Add bash. 36 RUN apk add --no-cache \ 37 bash 38 39 # Copy the entrypoint script. 40 COPY "docker/lnd/start-lnd.sh" . 41 RUN chmod +x start-lnd.sh