Compare commits

..

No commits in common. "16001129654df541f3e74d46c096eb87382478b4" and "c6af6a69eb9f19176ea42c2f55fc0380077efdc8" have entirely different histories.

3 changed files with 11 additions and 42 deletions

View File

@ -2,7 +2,7 @@ FROM alpine:latest
RUN \ RUN \
apk --update upgrade && \ apk --update upgrade && \
apk add unbound bind-tools tini && \ apk add unbound bind-tools && \
wget -O /etc/unbound/named.cache ftp://ftp.internic.net//domain/named.cache wget -O /etc/unbound/named.cache ftp://ftp.internic.net//domain/named.cache
COPY rootfs / COPY rootfs /
@ -10,4 +10,4 @@ COPY rootfs /
HEALTHCHECK --interval=30s --start-period=5s --timeout=10s \ HEALTHCHECK --interval=30s --start-period=5s --timeout=10s \
CMD /usr/bin/host -T -p 1053 asperti.com 127.0.0.1 CMD /usr/bin/host -T -p 1053 asperti.com 127.0.0.1
ENTRYPOINT ["/sbin/tini", "--", "/bin/sh", "/app/entrypoint.sh"] ENTRYPOINT ["/usr/sbin/unbound", "-d"]

View File

@ -1,39 +0,0 @@
#!/bin/sh
LOGS=${LOGS:-false}
LOGDIR=${LOGDIR:-/logs}
PORT=${PORT:-1053}
VERBOSITY=${VERBOSITY:-1}
# set logs
if [ "${LOGS}" = true ] ; then
mkdir -p "${LOGDIR}"
chown unbound:unbound "${LOGDIR}"
cat >> /etc/unbound/unbound.conf.d/logs.conf << EOF
server:
verbosity: ${VERBOSITY}
log-queries: yes
log-replies: yes
logfile: "${LOGDIR}/unbound.log"
log-time-ascii: yes
log-servfail: yes
log-local-actions: yes
EOF
else
cat >> /etc/unbound/unbound.conf.d/logs.conf << EOF
server:
verbosity: ${VERBOSITY}
log-queries: no
log-replies: no
logfile: ""
EOF
fi
# set port
cat >> /etc/unbound/unbound.conf.d/port.conf << EOF
server:
port: ${PORT}
EOF
# start unbound
/usr/sbin/unbound -d

View File

@ -1,5 +1,6 @@
server: server:
interface: 0.0.0.0 interface: 0.0.0.0
port: 1053
do-ip4: yes do-ip4: yes
do-ip6: no do-ip6: no
do-udp: yes do-udp: yes
@ -9,6 +10,14 @@ server:
cache-max-ttl: 86400 cache-max-ttl: 86400
prefetch: yes prefetch: yes
num-threads: 4 num-threads: 4
verbosity: 1
# log-queries: yes
log-queries: no
# log-replies: yes
logfile: ""
log-time-ascii: yes
log-servfail: yes
# log-local-actions: yes
use-syslog: no use-syslog: no
msg-cache-slabs: 8 msg-cache-slabs: 8
rrset-cache-slabs: 8 rrset-cache-slabs: 8
@ -27,4 +36,3 @@ dynlib:
remote-control: remote-control:
control-enable: yes control-enable: yes
control-interface: /run/unbound.control.sock control-interface: /run/unbound.control.sock
include-toplevel: "/etc/unbound/unbound.conf.d/*.conf"