From 84cf885986957341ab7e9a40be338962a4f1acbe Mon Sep 17 00:00:00 2001 From: f Date: Sat, 12 Sep 2020 19:42:22 -0300 Subject: [PATCH] knot --- Dockerfile | 8 ++++++++ monit.conf | 6 ++++++ 2 files changed, 14 insertions(+) create mode 100644 monit.conf diff --git a/Dockerfile b/Dockerfile index 59c5898..b8aef6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,2 +1,10 @@ FROM sutty/monit:latest MAINTAINER "f " + +RUN apk add --no-cache knot +COPY ./monit.conf /etc/monit.d/knot.conf + +EXPOSE 53 +EXPOSE 53/udp + +VOLUME /var/lib/knot diff --git a/monit.conf b/monit.conf new file mode 100644 index 0000000..c92e900 --- /dev/null +++ b/monit.conf @@ -0,0 +1,6 @@ +check process knot with pidfile /tmp/knot.pid + start program = "/usr/sbin/knotd -d" + stop program = "/usr/sbin/knotc stop" + if 5 restarts within 8 cycles then alert + if failed port 53 type udp protocol dns for 3 times within 5 cycles then restart + if failed port 53 type tcp protocol dns for 3 times within 5 cycles then restart