diff --git a/.drone.yml b/.drone.yml index 2f6cb16..5f0309e 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,7 @@ pipeline: docker: image: plugins/docker - repo: docker.jcg.re/template - registry: docker.jcg.re + repo: docker.io/jcgruenhage/coredns + registry: docker.io secrets: [ docker_username, docker_password ] tags: latest diff --git a/Dockerfile b/Dockerfile index 1536c20..4d54803 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,41 @@ FROM docker.io/alpine:3.8 LABEL maintainer="Jan Christian Grünhage > plugin.cfg \ + && go get -d github.com/coredns/unbound \ + && make CHECKS= godeps gen \ + && go build \ + && install -o root -g root -m +x ./coredns /usr/local/bin/coredns \ + && setcap cap_net_bind_service=+ep /usr/local/bin/coredns \ + && cd / \ + && apk del .build-deps \ + && rm -rf /tmp/gopath COPY docker/root / diff --git a/README.md b/README.md index c534e0f..e9c13c5 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ -## docker.jcg.re/template +## docker.io/jcgruenhage/coredns -This is a template repository for new dockerizations +Simple docker container for coredns with unbound support diff --git a/docker/root/etc/s6.d/coredns/finish b/docker/root/etc/s6.d/coredns/finish new file mode 100755 index 0000000..1a24852 --- /dev/null +++ b/docker/root/etc/s6.d/coredns/finish @@ -0,0 +1 @@ +#!/bin/sh diff --git a/docker/root/etc/s6.d/coredns/run b/docker/root/etc/s6.d/coredns/run new file mode 100755 index 0000000..5bd7555 --- /dev/null +++ b/docker/root/etc/s6.d/coredns/run @@ -0,0 +1,4 @@ +#!/bin/sh +cd /data +chown -R ${UID}:${GID} /data +su-exec ${UID}:${GID} coredns -conf /data/Corefile