mirror of
https://github.com/tiennm99/traefik-cloudflare-dns.git
synced 2026-10-11 03:13:52 +00:00
Create a record for each Host(...) in running containers' Traefik router labels, tagged with a configurable comment and optional tags, and delete owned records once their host has been down for DELETE_AFTER.
12 lines
420 B
Docker
12 lines
420 B
Docker
FROM --platform=$BUILDPLATFORM golang:1-alpine AS build
|
|
ARG TARGETOS TARGETARCH
|
|
WORKDIR /src
|
|
COPY go.mod ./
|
|
COPY *.go ./
|
|
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH go build -trimpath -ldflags="-s -w" -o /out/traefik-cloudflare-dns .
|
|
|
|
FROM gcr.io/distroless/static-debian12:nonroot
|
|
COPY --from=build /out/traefik-cloudflare-dns /traefik-cloudflare-dns
|
|
USER nonroot:nonroot
|
|
ENTRYPOINT ["/traefik-cloudflare-dns"]
|