Procházet zdrojové kódy

docker: ignore proxy for healthcheck command (#7532)

Co-authored-by: Joe Chen <jc@unknwon.io>
Matthias Jobst před 1 týdnem
rodič
revize
9963268267
3 změnil soubory, kde provedl 3 přidání a 2 odebrání
  1. 1 0
      CHANGELOG.md
  2. 1 1
      Dockerfile
  3. 1 1
      Dockerfile.next

+ 1 - 0
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
 

+ 1 - 1
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/"]

+ 1 - 1
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