You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

44 lines
1.1 KiB

  1. FROM docker.io/alpine:3.8
  2. LABEL maintainer="Jan Christian Grünhage <jan.christian@gruenhage.xyz"
  3. ARG COREDNS_VERSION=1.2.2
  4. ENV UID=1337 \
  5. GID=1337
  6. RUN apk add --no-cache \
  7. s6 \
  8. su-exec \
  9. unbound-libs \
  10. ca-certificates \
  11. libcap \
  12. bind-tools \
  13. && apk add --no-cache \
  14. -t .build-deps \
  15. unbound-dev \
  16. build-base \
  17. go \
  18. tar \
  19. coreutils \
  20. git \
  21. && export GOPATH=/tmp/gopath \
  22. && mkdir -p ${GOPATH}/src/github.com/coredns \
  23. && cd ${GOPATH}/src/github.com/coredns \
  24. && wget https://github.com/coredns/coredns/archive/v${COREDNS_VERSION}.tar.gz \
  25. && tar xf v${COREDNS_VERSION}.tar.gz \
  26. && mv coredns-${COREDNS_VERSION} coredns \
  27. && cd coredns \
  28. && echo "unbound:github.com/coredns/unbound" >> plugin.cfg \
  29. && go get -d github.com/coredns/unbound \
  30. && make CHECKS= godeps gen \
  31. && go build \
  32. && install -o root -g root -m +x ./coredns /usr/local/bin/coredns \
  33. && setcap cap_net_bind_service=+ep /usr/local/bin/coredns \
  34. && cd / \
  35. && apk del .build-deps \
  36. && rm -rf /tmp/gopath /root/.cache/go-build
  37. COPY docker/root /
  38. CMD ["/bin/s6-svscan", "/etc/s6.d"]