diff --git a/Dockerfile b/Dockerfile index f28f4e2f..8c10fa61 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile:labs +# syntax=docker/dockerfile:1.6 # 0. Prepare images ARG PYTHON_VERSION="3.11" @@ -61,3 +61,6 @@ VOLUME /config WORKDIR /config CMD ["go2rtc", "-config", "/config/go2rtc.yaml"] + +HEALTHCHECK --start-period=10s --start-interval=2s --interval=30s --timeout=10s --retries=3 \ + CMD curl --fail --silent --show-error --output /dev/null http://127.0.0.1:1984/api || exit 1 diff --git a/hardware.Dockerfile b/hardware.Dockerfile index b3e064c6..7c8745a4 100644 --- a/hardware.Dockerfile +++ b/hardware.Dockerfile @@ -1,4 +1,4 @@ -# syntax=docker/dockerfile:labs +# syntax=docker/dockerfile:1.6 # 0. Prepare images # only debian 12 (bookworm) has latest ffmpeg @@ -64,3 +64,6 @@ ENV NVIDIA_VISIBLE_DEVICES all ENV NVIDIA_DRIVER_CAPABILITIES compute,video,utility CMD ["go2rtc", "-config", "/config/go2rtc.yaml"] + +HEALTHCHECK --start-period=10s --start-interval=2s --interval=30s --timeout=10s --retries=3 \ + CMD curl --fail --silent --show-error --output /dev/null http://127.0.0.1:1984/api/ || exit 1