Open KonradHoeffner opened 1 year ago
This is almost certainly down to how musl does dns and not something we can solve here.
You are putting a musl built static binary inside of a rust container which is a debian based (glibc) distro, with dns resolution settings (resolv.conf / dnsmasq.conf) that is probably not ideal for what it was built for.
I would recommend following this post and seeing where that takes you. There's also a more kubernetes focused issue that may be useful at https://github.com/k3s-io/k3s/issues/6132.
Certain domains (for me it's github.com) always fail to resolve in rootless Docker when the image is built with muslrust:
main.rs
There are no dependencies installed.
Dockerfile
You can test this MWE at https://github.com/KonradHoeffner/mwedns:
Output
I reported this first at https://github.com/algesten/ureq/issues/645 but then found out it has nothing to do with ureq.
You can also verify that DNS lookup fails in rootless Docker with:
Relation to Alpine?
There is a known bug with the Alpine image reported at https://github.com/alpinelinux/docker-alpine/issues/155. However the things that differ here: