Dockerfile.nps 324 B

1234567891011
  1. FROM golang as builder
  2. WORKDIR /go/src/github.com/cnlh/nps
  3. COPY . .
  4. RUN go get -d -v ./...
  5. RUN CGO_ENABLED=0 go build -ldflags="-w -s -extldflags -static" ./cmd/nps/nps.go
  6. FROM scratch
  7. COPY --from=builder /go/src/github.com/cnlh/nps/nps /
  8. COPY --from=builder /go/src/github.com/cnlh/nps/web /web
  9. VOLUME /conf
  10. CMD ["/nps"]