added dockerfile

This commit is contained in:
GoodiesHQ 2024-10-29 03:10:44 -07:00
parent d2848585ce
commit 50e8222275

11
Dockerfile Normal file
View 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"]