1
0
mirror of https://github.com/Luzifer/dns.git synced 2024-09-19 15:23:03 +00:00

Add health check to docker container

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-02-06 20:20:13 +01:00
parent bbae3c1e22
commit a0806bee08
Signed by: luzifer
GPG Key ID: DC2729FDD34BE99E
2 changed files with 10 additions and 1 deletions

View File

@ -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 ["--"]

View File

@ -354,4 +354,10 @@ zones:
- name: ""
alias: docker01.cloud.kserver.biz.
server.test:
entries:
- name: health
type: TXT
records:
- "OK"
...