| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 1 | FROM alpine:3.18 |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 2 | |
| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 3 | LABEL maintainer "The Infrastructure Company GmbH GmbH <info@servercow.de>" |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 4 | |
| 5 | RUN apk add --update --no-cache \ |
| 6 | curl \ |
| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 7 | bind-tools \ |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 8 | unbound \ |
| 9 | bash \ |
| 10 | openssl \ |
| 11 | drill \ |
| 12 | tzdata \ |
| 13 | && curl -o /etc/unbound/root.hints https://www.internic.net/domain/named.cache \ |
| 14 | && chown root:unbound /etc/unbound \ |
| 15 | && adduser unbound tty \ |
| 16 | && chmod 775 /etc/unbound |
| 17 | |
| 18 | EXPOSE 53/udp 53/tcp |
| 19 | |
| 20 | COPY docker-entrypoint.sh /docker-entrypoint.sh |
| 21 | |
| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 22 | # healthcheck (dig, ping) |
| Matthias Andreas Benkard | d63fe56 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 23 | COPY healthcheck.sh /healthcheck.sh |
| 24 | RUN chmod +x /healthcheck.sh |
| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 25 | HEALTHCHECK --interval=30s --timeout=30s CMD [ "/healthcheck.sh" ] |
| Matthias Andreas Benkard | d63fe56 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 26 | |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 27 | ENTRYPOINT ["/docker-entrypoint.sh"] |
| 28 | |
| 29 | CMD ["/usr/sbin/unbound"] |