From d43f66ab2e84b876fec096b914d5b895116cff1c Mon Sep 17 00:00:00 2001 From: Djeeberjr Date: Sun, 3 Apr 2022 16:35:28 +0200 Subject: [PATCH] initial commit --- .drone.yml | 15 +++++++++++++++ Dockerfile | 20 ++++++++++++++++++++ docker-compose.yml | 8 ++++++++ plugin.cfg | 0 4 files changed, 43 insertions(+) create mode 100644 .drone.yml create mode 100644 Dockerfile create mode 100644 docker-compose.yml create mode 100644 plugin.cfg diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..a5220a1 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,15 @@ +kind: pipeline +type: docker +name: default + +steps: +- name: docker + image: plugins/docker + settings: + repo: djeeberjr/coredns + username: djeeberjr + password: + from_secret: DOCKER_HUB_TOKEN +trigger: + branch: + - master diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..62a2fd1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +FROM golang:1.17 as build + +RUN git clone https://github.com/coredns/coredns.git /coredns + +COPY plugin.cfg /coredns/plugin.cfg + +RUN cd /coredns && make + +FROM debian:stable-slim as cert + +RUN apt-get update && apt-get -uy upgrade +RUN apt-get -y install ca-certificates && update-ca-certificates + +FROM scratch + +COPY --from=cert /etc/ssl/certs /etc/ssl/certs +COPY --from=build /coredns/coredns /coredns + +EXPOSE 53 53/udp +ENTRYPOINT ["/coredns"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..9d7990f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3" + +services: + coredns: + build: . + image: djeeberjr/coredns + ports: + - "53:53/udp" diff --git a/plugin.cfg b/plugin.cfg new file mode 100644 index 0000000..e69de29