added dockerfile
This commit is contained in:
parent
d2848585ce
commit
50e8222275
1 changed files with 11 additions and 0 deletions
11
Dockerfile
Normal file
11
Dockerfile
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
FROM golang:1.23.2 as builder
|
||||
WORKDIR /build
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY cmd config ./
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/cfdns
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /app/cfdns /app/cfdns
|
||||
WORKDIR /app
|
||||
ENTRYPOINT ["/app/cfdns"]
|
||||
Loading…
Reference in a new issue