feat: add coredns mysql image build and updater
This commit is contained in:
1 parent
c3ab4cfb70
commit
6835e480c1
7 files changed
+195
-1
No files matched your search
+21
@@ -0,0 +1,21 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
# Copyright (C) 2026 Bryan Joshua Pedini
|
||||
|
||||
FROM golang:1.26-alpine AS build
|
||||
RUN apk add --no-cache git ca-certificates
|
||||
ARG COREDNS_VERSION
|
||||
RUN test -n "$COREDNS_VERSION"
|
||||
RUN git clone --depth 1 --branch "v${COREDNS_VERSION}" https://github.com/coredns/coredns.git /src
|
||||
WORKDIR /src
|
||||
RUN sed -i '/^file:file$/i mysql:github.com/cloud66-oss/coredns_mysql' plugin.cfg
|
||||
ARG MYSQL_PLUGIN_REV
|
||||
RUN test -n "$MYSQL_PLUGIN_REV"
|
||||
RUN go get "github.com/cloud66-oss/coredns_mysql@${MYSQL_PLUGIN_REV}"
|
||||
RUN go generate
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags='-s -w' -o /coredns .
|
||||
|
||||
FROM scratch
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
COPY --from=build /coredns /coredns
|
||||
EXPOSE 53 53/udp
|
||||
ENTRYPOINT ["/coredns"]
|
||||
Reference in new issue
Block a user