I'm using Docker desktop v2.3.0 and I enabled WSL2 on Windows 10 Professional v1909.
I installed Ubuntu 20.04 distribution, I accessed it and when I run apt-get update
:
Err:1 http://archive.ubuntu.com/ubuntu focal InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu focal-security InRelease
Temporary failure resolving 'security.ubuntu.com'
Err:3 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://archive.ubuntu.com/ubuntu focal-backports InRelease
Temporary failure resolving 'archive.ubuntu.com'
Reading package lists... Done
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease Temporary failure resolving 'archive.ubuntu.com'
W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/focal-security/InRelease Temporary failure resolving 'security.ubuntu.com'
W: Some index files failed to download. They have been ignored, or old ones used instead.
I tried to update the /etc/resolve.conf
by adding the company dns server after using ipconfig /all
.
Then I rebooted the WSL but does not work.
I found a similar question No internet connection on WSL Ubuntu (Windows Subsystem for Linux) and tried this solution but none of them fixed the issue for me.
I use a proxy to access the internet, can it forbid the WSL from accessing the external network and should add it the wsl config file?