Docker Can't Connect to Docker Daemon

ERROR: Couldn't connect to Docker daemon. You might need to start Docker for Windows

This error was caused by lack of memory in my machine. The Docker Desktop was not starting since it was configured to run with 2 GB.

To solve my problem, I changed this parameter in Settings -> Resources -> Memory, reducing it to the minimum allowed: 1 GB. I also changed the swap value (Settings -> Resources -> Swap), setting the value to its minimum (512 MB).

Rootless mode: Cannot connect to the Docker daemon at tcp://docker:2375

OP Here, the solution seems to be

docker run -it -v /run/user/1000/docker.sock:/var/run/docker.sock docker sh

This is because , the docker inside the docker image is not rootless. So, their socket is in /var/run/docker.sock.



Related Topics



Leave a reply



Submit