update once
This commit is contained in:
15
Dockerfile
Normal file
15
Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
# 构建阶段
|
||||
FROM golang:alpine AS builder
|
||||
WORKDIR /build
|
||||
COPY . .
|
||||
RUN go build -ldflags="-s -w" -o godns .
|
||||
|
||||
# 运行阶段
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates
|
||||
WORKDIR /godns
|
||||
COPY --from=builder /build/godns .
|
||||
COPY data ./data
|
||||
|
||||
VOLUME ["/godns/data"]
|
||||
ENTRYPOINT ["/godns/godns"]
|
||||
Reference in New Issue
Block a user