Dockerfile 664 B

1234567891011121314151617181920212223242526272829
  1. FROM alpine:3.20
  2. LABEL maintainer "The Infrastructure Company GmbH <info@servercow.de>"
  3. RUN apk add --update --no-cache \
  4. curl \
  5. bind-tools \
  6. unbound \
  7. bash \
  8. openssl \
  9. drill \
  10. tzdata \
  11. && curl -o /etc/unbound/root.hints https://www.internic.net/domain/named.cache \
  12. && chown root:unbound /etc/unbound \
  13. && adduser unbound tty \
  14. && chmod 775 /etc/unbound
  15. EXPOSE 53/udp 53/tcp
  16. COPY docker-entrypoint.sh /docker-entrypoint.sh
  17. # healthcheck (dig, ping)
  18. COPY healthcheck.sh /healthcheck.sh
  19. RUN chmod +x /healthcheck.sh
  20. HEALTHCHECK --interval=30s --timeout=30s CMD [ "/healthcheck.sh" ]
  21. ENTRYPOINT ["/docker-entrypoint.sh"]
  22. CMD ["/usr/sbin/unbound"]