diff --git a/docker/main/Dockerfile b/docker/main/Dockerfile index 91279115f..e0a67d1f7 100644 --- a/docker/main/Dockerfile +++ b/docker/main/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile:1.4 +# syntax=docker/dockerfile:1.6 # https://askubuntu.com/questions/972516/debian-frontend-environment-variable ARG DEBIAN_FRONTEND=noninteractive @@ -199,6 +199,9 @@ ENV S6_LOGGING_SCRIPT="T 1 n0 s10000000 T" ENTRYPOINT ["/init"] CMD [] +HEALTHCHECK --start-period=120s --start-interval=5s --interval=15s --timeout=5s --retries=3 \ + CMD curl --fail --silent --show-error http://127.0.0.1:5000/api/version || exit 1 + # Frigate deps with Node.js and NPM for devcontainer FROM deps AS devcontainer diff --git a/docker/tensorrt/Dockerfile.base b/docker/tensorrt/Dockerfile.base index 331a328b7..75cf7f494 100644 --- a/docker/tensorrt/Dockerfile.base +++ b/docker/tensorrt/Dockerfile.base @@ -24,3 +24,6 @@ COPY --from=trt-deps /usr/local/lib/libyolo_layer.so /usr/local/lib/libyolo_laye COPY --from=trt-deps /usr/local/src/tensorrt_demos /usr/local/src/tensorrt_demos COPY docker/tensorrt/detector/rootfs/ / ENV YOLO_MODELS="yolov7-320" + +HEALTHCHECK --start-period=600s --start-interval=5s --interval=15s --timeout=5s --retries=3 \ + CMD curl --fail --silent --show-error http://127.0.0.1:5000/api/version || exit 1