mirror of https://github.com/qwqdanchun/nps.git
11 lines
267 B
Docker
Executable File
11 lines
267 B
Docker
Executable File
FROM golang:1.13.8 as builder
|
|
WORKDIR /go/src/ehang.io/nps
|
|
COPY . .
|
|
RUN go get -d -v ./...
|
|
RUN CGO_ENABLED=0 go build -ldflags="-w -s -extldflags -static" ./cmd/npc/npc.go
|
|
|
|
FROM scratch
|
|
COPY --from=builder /go/src/ehang.io/nps/npc /
|
|
VOLUME /conf
|
|
ENTRYPOINT ["/npc"]
|