Files

13 lines
326 B
Docker
Raw Permalink Normal View History

2021-04-07 21:38:43 +08:00
FROM golang:1.15 as builder
2023-06-05 23:10:18 +08:00
ARG GOPROXY=direct
2020-01-08 21:57:14 +08:00
WORKDIR /go/src/ehang.io/nps
2019-11-27 22:46:34 +08:00
COPY . .
2023-06-02 17:27:29 +08:00
RUN go get -d -v ./...
2019-11-27 22:46:34 +08:00
RUN CGO_ENABLED=0 go build -ldflags="-w -s -extldflags -static" ./cmd/nps/nps.go
FROM scratch
2020-01-08 21:57:14 +08:00
COPY --from=builder /go/src/ehang.io/nps/nps /
COPY --from=builder /go/src/ehang.io/nps/web /web
2019-11-27 22:46:34 +08:00
VOLUME /conf
CMD ["/nps"]