From dfd7583e627f3bd5388f63292ced79c700dacb1b Mon Sep 17 00:00:00 2001 From: Patrick Asmus Date: Sun, 22 Nov 2026 02:52:50 +0100 Subject: [PATCH] =?UTF-8?q?Healthcheck=20=C3=BCber=20127.0.0.1=20statt=20l?= =?UTF-8?q?ocalhost?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Im Container löst localhost auf ::1 auf, nginx lauscht aber nur auf IPv4 (listen 80;). Der Healthcheck bekam deshalb "Connection refused" und der Container stand dauerhaft auf unhealthy, obwohl er normal auslieferte. Jetzt frage ich 127.0.0.1 ab und verwerfe die Ausgabe. Co-Authored-By: Claude Opus 5.5 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6cb254b..d0c46e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -46,5 +46,6 @@ RUN rm -rf /usr/share/nginx/html/.git \ EXPOSE 80 +# 127.0.0.1 statt localhost: localhost löst im Container auf ::1 auf, nginx lauscht nur auf IPv4 HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \ - CMD wget -qO- http://localhost:80/ || exit 1 + CMD wget -qO- http://127.0.0.1:80/ >/dev/null || exit 1