From 9963268267705c222aee8feb48a4b216d26bf804 Mon Sep 17 00:00:00 2001 From: Matthias Jobst Date: Sat, 31 Jan 2026 05:12:49 +0100 Subject: [PATCH] docker: ignore proxy for healthcheck command (#7532) Co-authored-by: Joe Chen --- CHANGELOG.md | 1 + Dockerfile | 2 +- Dockerfile.next | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae4a5144d..ca13088cc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ All notable changes to Gogs are documented in this file. - Submodules using `ssh://` protocol and a port number are not rendered correctly. [#4941](https://github.com/gogs/gogs/issues/4941) - Missing link to user profile on the first commit in commits history page. [#7404](https://github.com/gogs/gogs/issues/7404) - Unable to delete or display files with special characters in their names. [#7596](https://github.com/gogs/gogs/issues/7596) +- Docker healthcheck fails when `HTTP_PROXY` or `HTTPS_PROXY` environment variables are set. [#7529](https://github.com/gogs/gogs/issues/7529) ## 0.13.4 diff --git a/Dockerfile b/Dockerfile index 9d98aacde..c31b1b5f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,6 @@ RUN ./docker/build/finalize.sh # Configure Docker Container VOLUME ["/data", "/backup"] EXPOSE 22 3000 -HEALTHCHECK CMD (curl -o /dev/null -sS http://localhost:3000/healthcheck) || exit 1 +HEALTHCHECK CMD (curl --noproxy localhost -o /dev/null -sS http://localhost:3000/healthcheck) || exit 1 ENTRYPOINT ["/app/gogs/docker/start.sh"] CMD ["/usr/bin/s6-svscan", "/app/gogs/docker/s6/"] diff --git a/Dockerfile.next b/Dockerfile.next index 1a031cdfb..c33dde920 100644 --- a/Dockerfile.next +++ b/Dockerfile.next @@ -41,7 +41,7 @@ RUN chmod +x start.sh && \ # Configure Docker Container VOLUME ["/data", "/backup"] EXPOSE 22 3000 -HEALTHCHECK CMD (curl -o /dev/null -sS http://localhost:3000/healthcheck) || exit 1 +HEALTHCHECK CMD (curl --noproxy localhost -o /dev/null -sS http://localhost:3000/healthcheck) || exit 1 # Run as non-root user by default for better K8s security context support. USER git:git