diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..5697965 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,19 @@ +version: 2.1 + +orbs: + ivy-circleci-orb: nxtlytics/ivy-circleci-orb@0.0.5 + +workflows: + version: 2 + build: + jobs: + - ivy-circleci-orb/build_docker: + name: ivy-coredns + simple_docker_tag: true + context: ivy + filters: + branches: + ignore: + - /.*/ + tags: + only: /^v.*/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a609499 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +FROM golang:1.17.5-stretch + +ARG coredns_version=1.8.6 +ARG plugin_name=kubenodes +ARG plugin_repo=github.com/chrisohaver/kubenodes + +RUN go mod download github.com/coredns/coredns@v${coredns_version} + +WORKDIR $GOPATH/pkg/mod/github.com/coredns/coredns@v${coredns_version} +RUN go mod download + +RUN sed -i "/kubernetes/i ${plugin_name}:${plugin_repo}" plugin.cfg +RUN go get ${plugin_repo} +RUN make coredns +RUN mv coredns /tmp/coredns + +FROM scratch + +COPY --from=0 /etc/ssl/certs /etc/ssl/certs +COPY --from=0 /tmp/coredns /coredns + +EXPOSE 53 53/udp +ENTRYPOINT ["/coredns"] diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..fafc935 --- /dev/null +++ b/readme.md @@ -0,0 +1,5 @@ +# ivy-coredns + +This is a customized packaging of CoreDNS to include some plugins we find useful. + +See the `Dockerfile` for more information about what has been changed.