Files
auto-ci 8174346537
Configuration validation / lint (push) Has been cancelled
Configuration validation / smoke (push) Has been cancelled
Enable native ARM runtime for 3proxy, coredns, and unbound
2026-03-06 21:02:25 -05:00

26 lines
1.0 KiB
Docker

FROM debian:stable-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
unbound \
unbound-anchor \
dnsutils \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# Keep path compatibility with existing bind mounts in docker-compose.yml
RUN mkdir -p /opt/unbound/etc/unbound /opt/unbound/etc/unbound/dev /opt/unbound/etc/unbound/var \
&& : > /opt/unbound/etc/unbound/dev/null
# Pre-create DNSSEC trust anchor used by the mounted unbound.conf.
RUN unbound-anchor -a /opt/unbound/etc/unbound/var/root.key || true
# Allow unbound daemon user to update trust anchors and write to chrooted /dev/null.
RUN chown -R unbound:unbound /opt/unbound/etc/unbound/var /opt/unbound/etc/unbound/dev \
&& chmod 666 /opt/unbound/etc/unbound/dev/null
EXPOSE 53/tcp 53/udp
CMD ["/bin/sh", "-c", "[ -s /opt/unbound/etc/unbound/var/root.key ] || unbound-anchor -a /opt/unbound/etc/unbound/var/root.key || true; exec unbound -d -c /opt/unbound/etc/unbound/unbound.conf"]