mirror of
https://github.com/sickcodes/Docker-OSX.git
synced 2026-04-27 08:35:48 +03:00
[GH-ISSUE #281] Internet from docker container but not from qemu #191
Labels
No labels
bug
documentation
enhancement
following upstream developments
good first issue
help wanted
invalid
pull-request
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/Docker-OSX#191
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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).
Original GitHub issue: https://github.com/sickcodes/Docker-OSX/issues/281
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.