Linux tricks for 400: You are chrooted into an read-only image and don't have a working name server, as /etc/resolv.conf does not exist. What do you do?
Conversation
Replying to
Bind mount only works if the target file exists. I had a solution without overlayfs.
1
Replying to
run a local dns server I suppose ("If this file does not exist, only the name server on the local machine will be queried")
1
1
Replying to
depends on whether the host is also a read-only grml, because if not I can just run the dns server there (it's not a container, just a chroot)
otherwise, a quick google suggests that grml has socat, so use that to forward dns requests.
1
Replying to
Yes, but it's an old Grml 2018 and "apt install unbound" didn't do anything useful.
1
Replying to
assuming no socat, you might also be able to iptables-NAT an existing DNS server, but that might fail depending on how a locally running DNS server is detected. but worth a try?

