Dockerfile 994 B

123456789101112131415161718192021222324252627282930313233343536
  1. FROM alpine:3.21
  2. LABEL maintainer = "The Infrastructure Company GmbH <info@servercow.de>"
  3. RUN apk add --update --no-cache \
  4. curl \
  5. bind-tools \
  6. coreutils \
  7. unbound \
  8. bash \
  9. openssl \
  10. drill \
  11. tzdata \
  12. syslog-ng \
  13. supervisor \
  14. && curl -o /etc/unbound/root.hints https://www.internic.net/domain/named.cache \
  15. && chown root:unbound /etc/unbound \
  16. && adduser unbound tty \
  17. && chmod 775 /etc/unbound
  18. EXPOSE 53/udp 53/tcp
  19. COPY docker-entrypoint.sh /docker-entrypoint.sh
  20. # healthcheck (dig, ping)
  21. COPY healthcheck.sh /healthcheck.sh
  22. COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf
  23. COPY supervisord.conf /etc/supervisor/supervisord.conf
  24. COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh
  25. RUN chmod +x /healthcheck.sh
  26. HEALTHCHECK --interval=30s --timeout=10s \
  27. CMD sh -c '[ -f /tmp/healthcheck_status ] && [ "$(cat /tmp/healthcheck_status)" -eq 0 ] || exit 1'
  28. ENTRYPOINT ["/docker-entrypoint.sh"]
  29. CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]