initial impl
This commit is contained in:
parent
283dc2f253
commit
f9a9cbf755
|
@ -1,7 +1,7 @@
|
||||||
pipeline:
|
pipeline:
|
||||||
docker:
|
docker:
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
repo: docker.jcg.re/template
|
repo: docker.io/jcgruenhage/coredns
|
||||||
registry: docker.jcg.re
|
registry: docker.io
|
||||||
secrets: [ docker_username, docker_password ]
|
secrets: [ docker_username, docker_password ]
|
||||||
tags: latest
|
tags: latest
|
||||||
|
|
31
Dockerfile
31
Dockerfile
|
@ -1,12 +1,41 @@
|
||||||
FROM docker.io/alpine:3.8
|
FROM docker.io/alpine:3.8
|
||||||
LABEL maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz"
|
LABEL maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz"
|
||||||
|
|
||||||
|
ARG COREDNS_VERSION=1.2.2
|
||||||
|
|
||||||
ENV UID=1337 \
|
ENV UID=1337 \
|
||||||
GID=1337
|
GID=1337
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
s6 \
|
s6 \
|
||||||
su-exec
|
su-exec \
|
||||||
|
unbound-libs \
|
||||||
|
ca-certificates \
|
||||||
|
libcap \
|
||||||
|
&& apk add --no-cache \
|
||||||
|
-t .build-deps \
|
||||||
|
unbound-dev \
|
||||||
|
build-base \
|
||||||
|
go \
|
||||||
|
tar \
|
||||||
|
coreutils \
|
||||||
|
git \
|
||||||
|
&& export GOPATH=/tmp/gopath \
|
||||||
|
&& mkdir -p ${GOPATH}/src/github.com/coredns \
|
||||||
|
&& cd ${GOPATH}/src/github.com/coredns \
|
||||||
|
&& wget https://github.com/coredns/coredns/archive/v${COREDNS_VERSION}.tar.gz \
|
||||||
|
&& tar xf v${COREDNS_VERSION}.tar.gz \
|
||||||
|
&& mv coredns-${COREDNS_VERSION} coredns \
|
||||||
|
&& cd coredns \
|
||||||
|
&& echo "unbound:github.com/coredns/unbound" >> 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 /
|
COPY docker/root /
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
#!/bin/sh
|
|
@ -0,0 +1,4 @@
|
||||||
|
#!/bin/sh
|
||||||
|
cd /data
|
||||||
|
chown -R ${UID}:${GID} /data
|
||||||
|
su-exec ${UID}:${GID} coredns -conf /data/Corefile
|
Loading…
Reference in New Issue