一種方法是添加當前用戶到docker組里去,當時添加的時候貌似是沒問題的,但是現在又不可以了
產生的報錯
? docker images
Cannot connect to the Docker daemon at unix:///home/ying/.docker/desktop/docker.sock. Is the docker daemon running?
解決辦法
docker context use default
讓我們感謝這位大佬把!!
參考
https://forums.docker.com/t/docker-ps-cannot-connect-to-the-docker-dameon-at-unix-home-mark-docker-desktop-docker-sock/136121