mirror of
https://github.com/Luzifer/dns.git
synced 2024-09-19 23:32:56 +00:00
Add health check to docker container
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
bbae3c1e22
commit
a0806bee08
@ -16,7 +16,7 @@ COPY --from=0 /go/bin/coredns /usr/local/bin/
|
|||||||
|
|
||||||
ADD ./requirements.txt /src/requirements.txt
|
ADD ./requirements.txt /src/requirements.txt
|
||||||
RUN set -ex \
|
RUN set -ex \
|
||||||
&& apk --no-cache add python3 \
|
&& apk --no-cache add python3 bind-tools \
|
||||||
&& pip3 install -r /src/requirements.txt
|
&& pip3 install -r /src/requirements.txt
|
||||||
|
|
||||||
ADD . /src
|
ADD . /src
|
||||||
@ -26,5 +26,8 @@ EXPOSE 53/udp 53
|
|||||||
|
|
||||||
VOLUME ["/src/zones"]
|
VOLUME ["/src/zones"]
|
||||||
|
|
||||||
|
HEALTHCHECK --interval=30s --timeout=5s \
|
||||||
|
CMD dig +short @localhost health.server.test TXT || exit 1
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/coredns"]
|
ENTRYPOINT ["/usr/local/bin/coredns"]
|
||||||
CMD ["--"]
|
CMD ["--"]
|
||||||
|
Loading…
Reference in New Issue
Block a user