Summary
How to Fix the timeout error below. Issue happened when rebuild docker project by docker-compose up -d --build
.
#Error Messages
docker wsl2 ubuntu Error response from daemon: Get "https://registry-1.docker.io/v2/": net/http: request canceled while waiting for connection
Reason
Since the info. of nameserver(IP Address) has changed due to router renewal,etc on ubuntu wsl2,Docker can not access to the internet then got this timeout issues.
Solution
- Find correct Gateway IP Address on windows PC by
ipconfig
. - open ubunt wsl2 cli then change to new one by
vi /etc/reolv.conf
.
# nameserver below needs to change to new Default Gateway IP
nameserver 8.8.8.8