Files
2023-02-28 12:02:12 +01:00

29 lines
488 B
Docker

FROM golang:latest AS builder
WORKDIR /
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY *.go ./
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o rdns-authoritative .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /rdns-authoritative ./
ENV CONFIG=/etc/rdns/config.yml
ENV LOGS=false
ENV METRICS=false
CMD ./rdns-authoritative --config $CONFIG \
--addr 0.0.0.0 \
--logs=$LOGS \
--metrics=$METRICS