| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame^] | 1 | FROM alpine:3.23 |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 2 | |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame^] | 3 | LABEL maintainer = "The Infrastructure Company GmbH <info@servercow.de>" |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 4 | |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame^] | 5 | # install unbound from alpine:edge to get security patches |
| 6 | # minimum version is pinned |
| 7 | RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/main "unbound>=1.26.1-r0" |
| 8 | |
| 9 | # install other packages from regular alpine stable repo |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 10 | RUN apk add --update --no-cache \ |
| 11 | curl \ |
| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 12 | bind-tools \ |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame^] | 13 | coreutils \ |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 14 | bash \ |
| 15 | openssl \ |
| 16 | drill \ |
| 17 | tzdata \ |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame^] | 18 | syslog-ng \ |
| 19 | supervisor \ |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 20 | && curl -o /etc/unbound/root.hints https://www.internic.net/domain/named.cache \ |
| 21 | && chown root:unbound /etc/unbound \ |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame^] | 22 | && adduser unbound tty \ |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 23 | && chmod 775 /etc/unbound |
| 24 | |
| 25 | EXPOSE 53/udp 53/tcp |
| 26 | |
| 27 | COPY docker-entrypoint.sh /docker-entrypoint.sh |
| 28 | |
| Matthias Andreas Benkard | 9dabdab | 2024-03-06 13:12:09 +0100 | [diff] [blame] | 29 | # healthcheck (dig, ping) |
| Matthias Andreas Benkard | d63fe56 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 30 | COPY healthcheck.sh /healthcheck.sh |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame^] | 31 | COPY syslog-ng.conf /etc/syslog-ng/syslog-ng.conf |
| 32 | COPY supervisord.conf /etc/supervisor/supervisord.conf |
| 33 | COPY stop-supervisor.sh /usr/local/sbin/stop-supervisor.sh |
| 34 | |
| Matthias Andreas Benkard | d63fe56 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 35 | RUN chmod +x /healthcheck.sh |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame^] | 36 | HEALTHCHECK --interval=30s --timeout=10s \ |
| 37 | CMD sh -c '[ -f /tmp/healthcheck_status ] && [ "$(cat /tmp/healthcheck_status)" -eq 0 ] || exit 1' |
| Matthias Andreas Benkard | d63fe56 | 2023-11-18 13:18:30 +0100 | [diff] [blame] | 38 | |
| Matthias Andreas Benkard | 4edeb9f | 2021-01-02 15:32:21 +0100 | [diff] [blame] | 39 | ENTRYPOINT ["/docker-entrypoint.sh"] |
| Matthias Andreas Benkard | 97f1202 | 2026-10-23 08:46:40 +0200 | [diff] [blame^] | 40 | CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] |