-
Notifications
You must be signed in to change notification settings - Fork 2k
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
bind-tools needed for DNS lookups #339
Comments
Hi @rudijs, and thanks for this detailed guide. It will definitely help others in a similar situation. The main point of the We might consider making multiple alpine variants in the future, but as this point we do not want to increase the number of variants due to the maintenance overhead. |
Hi @Starefossen Yep that's all good, I understand. I don't mind at all to add explicitly what the app needs. In this case I dont mind adding bind-tools. The only thing I'd mention to consider is the DNS is part of the node.js core, but by default it's not going to work with this Alpine image - so a built in core feature, not extra feature, will not work. New users will get tripped up on this, and will see the same error and all spend the same time searching around for why this is so. For me though like I said I don't mind at all, but it's worth considering and putting here in writing to Google to index and other users to find. I'll go ahead and close this issue. Cheers. |
@rudijs did you get DNS lookups to work within this container? It's driving me absolutely mad - for whatever reason I can't seem to query outside DNS. |
@mcblum have you tried at the OS level to make sure it isn't a docker config issue? |
@LaurentGoderre I can't believe this was it, but every node just needed to be rebooted. I don't know why, but that fixed it. Sometimes one gets so in the weeds one forgets to try the easiest thing. |
that's strange but glad you go it figured out! |
@Starefossen The bind-tools package adds just 1MB to the final image size, yet it greatly improves DNS lookups performance within Alpine for Docker/k8s deployments. |
Yuuuuuup. Throw me on the pile. |
Hi,
When we build our node app we need to add the package bind-tools so that DNS lookups work.
Perhaps this should go into the Docker build for this official base image as it's such a common need/use case.
Example, here I fire up a container and run nslookup
Fix the nslookup by adding bind-tools
DNS lookups all good:
I noticed this when I switched to alpine linux today, some of our node containers were unable to lookup hostnames it needs.
I don't mind adding bind-tools manually, just suggesting it might be valuable to have by default.
Hope this helps.
Thanks.
The text was updated successfully, but these errors were encountered: