minor bug fix, docker

This commit is contained in:
ffdfgdfg
2019-11-27 22:46:34 +08:00
parent 32e3d411ad
commit 78ebeba1bb
6 changed files with 42 additions and 9 deletions

10
Dockerfile.npc Executable file
View File

@@ -0,0 +1,10 @@
FROM golang as builder
WORKDIR /go/src/github.com/cnlh/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/github.com/cnlh/nps/npc /
VOLUME /conf
ENTRYPOINT ["/npc"]