Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localhost does not resolve inside container so healthcheck fails, use 127.0.0.1 #810

Open
dkebler opened this issue Jan 8, 2025 · 0 comments

Comments

@dkebler
Copy link

dkebler commented Jan 8, 2025

in the Dockerfile the healthcheck uses localhost which is not resolving so the healthcheck fails and the container shuts down even though everything is working fine

If I do a terminal in the container I can use 127.0.0.1 instead of localhost and the nc command succeeds so can you please change this and republish your image at hub.docker.com. Thanks!

HEALTHCHECK --interval=1m --timeout=10s \
  CMD nc -z localhost ${BUKUSERVER_PORT} || exit 1

to

HEALTHCHECK --interval=1m --timeout=10s \
  CMD nc -z 127.0.0.1 ${BUKUSERVER_PORT} || exit 1

or consider just removing the healthcheck all together as even after failing the container did not restart.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant