-
Notifications
You must be signed in to change notification settings - Fork 289
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker build exception: Invoke-WebRequest : The remote name could not be resolved #6453
Comments
Same issues here |
I also have a similar issue but when installing or using chocolatey package manager. It always seems to be when using powershell based commands. If you take the following dockerfile as an example:
The Visual Studio exe download will succeed but then the choco install script running from powershell will fail saying that the host cannot be resolved, like there is a dns/internet issue. However if there was an internet/dns issue, how did the VS exe download first? |
Similar issue being encountered with Docker Engine v19.03.11, on Windows Server 2016 host. This isn't woking: Yet this works: |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
I am experiencing the same issue as well |
@kkbruce hello, |
@RichardMM |
Same problem here following https://www.aeons.dev/2020/02/19/win2016-with-vsbuild-docker/ |
Fix DNS issue in Windows Container by adding the following --network switch: --network "Default Switch" docker/for-win#6453 (comment) docker build --network "Default Switch" -t willh/mssql-server-windows-developer:20H2 .
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
Same problem in docker build and docker run, works only with --network "Default Switch" parameter. |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
This problem still exists and is quite problematic |
Hi all,
|
I wasted 2 hours of time trying to fix this. What I've done is removing my wifi dongle (I am connected to ethernet via wired LAN). I believe if it's built-in. Disabling it will suffice. |
@hatasaki's comment helped fix this for me. One thing to note is I had 2 interfaces (Network 8 and 9) with metrics 1, when I updated the required interface (network 3) to metrics 1, it still didn't work. I had to update the Network 8 and 9 metrics to be 2 to get docker to use the correct interface. |
All, WSL 1 was working fine but WSL2 does not work at all. Something is clearly wrong. However, I was able to get around everything and work locally OR on a VPN with the following extremely helpful github repo: https://github.com/sakai135/wsl-vpnkit Install the following and your problems should be solved. |
/remove-lifecycle stale |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
/remove-lifecycle stale |
Issues go stale after 90 days of inactivity. Prevent issues from auto-closing with an If this issue is safe to close now please do so. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
In my case, I just do these:
It's work for me. |
Closed issues are locked after 30 days of inactivity. If you have found a problem that seems similar to this, please open a new issue. Send feedback to Docker Community Slack channels #docker-for-mac or #docker-for-windows. |
Expected behavior
download file in
docker build
with Windows container.Actual behavior
Can't download the file in
docker build
with Windows container.Information
Steps to reproduce the behavior
docker build -t kkbruce/nginx:1.18.0-servercore-1909 .
and getInvoke-WebRequest : The remote name could not be resolved: 'nginx.org'
exception.I found a like issue pulla2908/docker-mssql-server-windows-developer-fti#2 , if I add
--network "Default Switch"
thendocker build
will success.Now that the container wants to connect to the external network, do we need additional parameters?
Added: If after a while in Windows 10, it will return to an abnormal state.
The text was updated successfully, but these errors were encountered: