mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-01-11 21:10:25 +01:00
Internet from docker container but not from qemu #192
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Kiblyn11 on GitHub (May 21, 2021).
Followed initial setup properly.
I tried basic command and I cannot ping or curl internet (works from docker container though).
I found that it works if I add
--net=host(which I don't want to).I don't have a fancy networking configuration.
Start command:
Logs:
@Kiblyn11 commented on GitHub (May 21, 2021):
Well in fact it has internet access, just saw the comment about ping not working.
So it can curl http://1.1.1.1, else dns resolution fails.
@Kiblyn11 commented on GitHub (May 21, 2021):
Found out that QEMU use only first nameserver declared in /etc/resolv.conf, which is a local resolver I have, so that's why it's not working. (see https://unix.stackexchange.com/questions/614064/why-dns-stops-resolving-under-qemu-user-networking-when-the-host-roams-to-a-pa)
Have been able to fix it by forcing a dns resolver with
--dns=1.1.1.1for instance.