I am trying to install docker in Windows 10 (WSL2 - Ubuntu 20.04LTS) and run the following command, it's not working, the console displays this message "gpg: can't connect to the agent: IPC connect call failed"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Make sure that your Ubuntu 20.04 is using WSL 2. When I installed it is was set to WSL1. Changing it to WSL2 seemed to have done the trick.
In Powershell run this command:
wsl --set-version Ubuntu-20.04 2
If you don't have WSL 2, you'll need to install Ubuntu 18.04 from the Windows store.
I just ran into the same issue with a fresh WSL + Docker install. As is documented in issue #5125 in the WSL repo, Ubuntu 20.04 is incompatible with WSL 1 . After installing Ubuntu 18.04, I was able to work through the rest of the Docker install instructions and continue through this useful tutorial .
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.