mirror of https://github.com/qwqdanchun/nps.git
11 lines
274 B
Docker
11 lines
274 B
Docker
|
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"]
|