nps/Dockerfile.npc

11 lines
260 B
Docker
Raw Normal View History

2019-11-27 14:46:34 +00:00
FROM golang as builder
2020-01-08 13:57:14 +00:00
WORKDIR /go/src/ehang.io/nps
2019-11-27 14:46:34 +00:00
COPY . .
RUN go get -d -v ./...
RUN CGO_ENABLED=0 go build -ldflags="-w -s -extldflags -static" ./cmd/npc/npc.go
FROM scratch
2020-01-08 13:57:14 +00:00
COPY --from=builder /go/src/ehang.io/nps/npc /
2019-11-27 14:46:34 +00:00
VOLUME /conf
ENTRYPOINT ["/npc"]