![Windows Docker 컨테이너가 인터넷에 액세스할 수 없습니다.](https://rvso.com/image/1585762/Windows%20Docker%20%EC%BB%A8%ED%85%8C%EC%9D%B4%EB%84%88%EA%B0%80%20%EC%9D%B8%ED%84%B0%EB%84%B7%EC%97%90%20%EC%95%A1%EC%84%B8%EC%8A%A4%ED%95%A0%20%EC%88%98%20%EC%97%86%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
저는 Windows 10 PC에서 실행 중입니다. Windows용 Docker를 설치하고 Windows 기능에서 컨테이너와 Hyper-V를 모두 활성화했습니다. BIOS에서 가상화가 활성화되었습니다.
실행하면 docker run mcr.microsoft.com/windows/nanoserver ping google.com
다음이 표시됩니다.
Ping request could not find host google.com. Please check the name and try again.
그리고 를 실행하면 docker run mcr.microsoft.com/windows/nanoserver ping 8.8.8.8
다음을 얻습니다.
Pinging 8.8.8.8 with 32 bytes of data:
Request timed out.
Reply from 172.18.81.109: Destination host unreachable.
Request timed out.
Request timed out.
Ping statistics for 8.8.8.8:
Packets: Sent = 4, Received = 1, Lost = 3 (75% loss),
호스트 컴퓨터에서 둘 중 하나를 실행하면 적절하게 작동합니다.
여기에서 디버그 스크립트를 실행했습니다.https://github.com/MicrosoftDocs/Virtualization-Documentation/tree/live/windows-server-container-tools/Debug-ContainerHost모든 테스트가 통과되었습니다.
내 컨테이너가 외부 인터넷으로 라우팅할 수 없는 이유를 아시나요?
답변1
매우 만족스럽지 못한 답변이지만 모든 Windows 업데이트를 설치하고 Docker를 제거하고 Hyper V 및 컨테이너를 비활성화/재활성화하고 Docker를 다시 설치한 후 작동하게 되었습니다.
내가 아는 바로는 Windows 업데이트가 누락된 것이었습니다.