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

Healthcheck name resolver #175

Open
brccabral opened this issue Mar 25, 2024 · 1 comment
Open

Healthcheck name resolver #175

brccabral opened this issue Mar 25, 2024 · 1 comment

Comments

@brccabral
Copy link

My image is image: mvance/unbound:latest.
Current healthcheck command is
drill @127.0.0.1 cloudfare.com

I setup unbound in a subnet 172.19.0.x. This drill command fails when using 127.0.0.1, causing the healthcheck to only show unhealthy.
I think it is because it is expecting unbound to be run in the host network.
But in the /etc/resolv.conf the nameserver is 127.0.0.11, so, I tried drill @127.0.0.11 cloudfare.com and it works.

As far as I understand 127.0.0.11 is the default Docker nameserver (DNS).
https://medium.com/@prajwal.chin/understanding-docker-dns-2ed4b070a0

Therefore, should the default healthcheck be changed to use 127.0.0.11 instead?

Thanks,
Bruno

@ar0311
Copy link

ar0311 commented May 22, 2024

Same issue here

Fixed here by adding the following to compose file:

healthcheck:
      test: ["CMD", "drill", "@127.0.0.11", "cloudflare.com"]
      interval: 60s
      timeout: 10s

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

2 participants