github.com/decred/dcrlnd@v0.7.6/docker/dcrlnd/Dockerfile (about) 1 FROM golang:1.20-alpine as builder 2 3 # Install dependencies. 4 RUN apk add --no-cache --update git make 5 6 # Copy in the local repository to build from. 7 COPY . /go/src/github.com/decred/dcrlnd 8 9 # Force Go to use the cgo based DNS resolver. This is required to ensure DNS 10 # queries required to connect to linked containers succeed. 11 ENV GODEBUG netdns=cgo 12 13 RUN cd /go/src/github.com/decred/dcrlnd \ 14 && go install ./cmd/dcrlnd \ 15 && go install ./cmd/dcrlncli 16 17 # Start a new, final image to reduce size. 18 FROM alpine as final 19 20 # Add bash. 21 RUN apk add --no-cache bash 22 23 # Expose dcrlnd ports (server, rpc). 24 EXPOSE 9735 10009 25 26 # Copy the binaries from the builder image. 27 COPY --from=builder /go/bin/dcrlncli /bin/ 28 COPY --from=builder /go/bin/dcrlnd /bin/ 29 30 # Copy the entrypoint script. 31 COPY "docker/dcrlnd/start-dcrlnd.sh" . 32 RUN chmod +x start-dcrlnd.sh