From 82329ae60f6866591c9b990e1bb38a9b774fe59e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sat, 7 Mar 2026 14:14:02 +0000 Subject: [PATCH] fix: use QlPort in health check only for host network mode Co-authored-by: whyour <22700758+whyour@users.noreply.github.com> --- docker/310.Dockerfile | 2 +- docker/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker/310.Dockerfile b/docker/310.Dockerfile index fb690b57..2457b58d 100644 --- a/docker/310.Dockerfile +++ b/docker/310.Dockerfile @@ -84,6 +84,6 @@ COPY --from=builder /tmp/build/node_modules/. /ql/node_modules/ WORKDIR ${QL_DIR} HEALTHCHECK --interval=5s --timeout=2s --retries=20 \ - CMD curl -sf --noproxy '*' http://127.0.0.1:${QlPort:-5700}/api/health || exit 1 + CMD if ip link show docker0 > /dev/null 2>&1; then PORT=${QlPort:-5700}; else PORT=5700; fi; curl -sf --noproxy '*' http://127.0.0.1:$PORT/api/health || exit 1 ENTRYPOINT ["./docker/docker-entrypoint.sh"] diff --git a/docker/Dockerfile b/docker/Dockerfile index 5682ae9d..f5bd8c0f 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -84,6 +84,6 @@ COPY --from=builder /tmp/build/node_modules/. /ql/node_modules/ WORKDIR ${QL_DIR} HEALTHCHECK --interval=5s --timeout=2s --retries=20 \ - CMD curl -sf --noproxy '*' http://127.0.0.1:${QlPort:-5700}/api/health || exit 1 + CMD if ip link show docker0 > /dev/null 2>&1; then PORT=${QlPort:-5700}; else PORT=5700; fi; curl -sf --noproxy '*' http://127.0.0.1:$PORT/api/health || exit 1 ENTRYPOINT ["./docker/docker-entrypoint.sh"]