diff --git a/Dockerfile b/Dockerfile index 62974cf..807fd0d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ COPY --from=0 /go/bin/coredns /usr/local/bin/ ADD ./requirements.txt /src/requirements.txt RUN set -ex \ - && apk --no-cache add python3 \ + && apk --no-cache add python3 bind-tools \ && pip3 install -r /src/requirements.txt ADD . /src @@ -26,5 +26,8 @@ EXPOSE 53/udp 53 VOLUME ["/src/zones"] +HEALTHCHECK --interval=30s --timeout=5s \ + CMD dig +short @localhost health.server.test TXT || exit 1 + ENTRYPOINT ["/usr/local/bin/coredns"] CMD ["--"] diff --git a/zones.yml b/zones.yml index 5a7b96a..6bad0ac 100644 --- a/zones.yml +++ b/zones.yml @@ -354,4 +354,10 @@ zones: - name: "" alias: docker01.cloud.kserver.biz. + server.test: + entries: + - name: health + type: TXT + records: + - "OK" ...