diff --git a/coredns/Dockerfile b/coredns/Dockerfile new file mode 100644 index 0000000..f5b065f --- /dev/null +++ b/coredns/Dockerfile @@ -0,0 +1,13 @@ +FROM d.xr.to/base AS builder +RUN xbps-remote go unbound-devel git make gcc +RUN mkdir -p /root/go/src/github.com/coredns +RUN git clone --depth=2 https://github.com/coredns/coredns.git /root/go/src/github.com/coredns/coredns +RUN cd /root/go/src/github.com/coredns/coredns && echo 'unbound:github.com/coredns/unbound' >> plugin.cfg && sed -i '/\(grpc\|route53\|azure\|clouddns\|k8s_external\|kubernetes\)\:/d' plugin.cfg && sed -i 's:CGO_ENABLED=\$(CGO_ENABLED)::' Makefile +RUN cd /root/go/src/github.com/coredns/coredns && go generate && make + +FROM d.xr.to/base +RUN xbps-remote libunbound +COPY --from=builder /root/go/src/github.com/coredns/coredns/coredns coredns +COPY files/Corefile /config/Corefile +WORKDIR "/config" +CMD ["/coredns"] diff --git a/coredns/files/Corefile b/coredns/files/Corefile new file mode 100644 index 0000000..d80cde9 --- /dev/null +++ b/coredns/files/Corefile @@ -0,0 +1,5 @@ +. { + unbound + cache + log +}