Docker network issue: Could not resolve host: github.com #402

Closed
opened 2025-12-29 00:26:28 +01:00 by adam · 4 comments
Owner

Originally created by @acheong08 on GitHub (Sep 26, 2022).

 $ docker run -it \
    --device /dev/kvm \
    -p 50922:10022 \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e "DISPLAY=${DISPLAY:-:0.0}" \
    -e GENERATE_UNIQUE=true \
    -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \
    sickcodes/docker-osx:monterey
DEVICE_MODEL:       iMacPro1,1
SERIAL_SET_COUNT:   1
OUTPUT_DIRECTORY:   .
Cloning into 'OpenCorePkg'...
fatal: unable to access 'https://github.com/acidanthera/OpenCorePkg.git/': Could not resolve host: github.com

Tried with and without VPN

Originally created by @acheong08 on GitHub (Sep 26, 2022). ``` $ docker run -it \ --device /dev/kvm \ -p 50922:10022 \ -v /tmp/.X11-unix:/tmp/.X11-unix \ -e "DISPLAY=${DISPLAY:-:0.0}" \ -e GENERATE_UNIQUE=true \ -e MASTER_PLIST_URL='https://raw.githubusercontent.com/sickcodes/osx-serial-generator/master/config-custom.plist' \ sickcodes/docker-osx:monterey DEVICE_MODEL: iMacPro1,1 SERIAL_SET_COUNT: 1 OUTPUT_DIRECTORY: . Cloning into 'OpenCorePkg'... fatal: unable to access 'https://github.com/acidanthera/OpenCorePkg.git/': Could not resolve host: github.com ``` Tried with and without VPN
adam closed this issue 2025-12-29 00:26:28 +01:00
Author
Owner

@acheong08 commented on GitHub (Sep 26, 2022):

China blocks GitHub. GitHub blocks VPN

@acheong08 commented on GitHub (Sep 26, 2022): China blocks GitHub. GitHub blocks VPN
Author
Owner

@linghai06 commented on GitHub (Nov 27, 2022):

@acheong08 did you work around the problem?

@linghai06 commented on GitHub (Nov 27, 2022): @acheong08 did you work around the problem?
Author
Owner

@acheong08 commented on GitHub (Nov 27, 2022):

@acheong08 did you work around the problem?

Yes but I don't know how. I reinstalled the image after a while and now the image doesn't work without a VPN.

A possibility: Use a local DNS resolver to prevent the VPN overriding the container's DNS.

@acheong08 commented on GitHub (Nov 27, 2022): > @acheong08 did you work around the problem? Yes but I don't know how. I reinstalled the image after a while and now the image doesn't work without a VPN. A possibility: Use a local DNS resolver to prevent the VPN overriding the container's DNS.
Author
Owner

@linClubs commented on GitHub (Dec 20, 2023):

哥,怎么解决这个问题的,能改源文件不把git地址加上代理?

@linClubs commented on GitHub (Dec 20, 2023): 哥,怎么解决这个问题的,能改源文件不把git地址加上代理?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/Docker-OSX#402