Docker Desktop for Windows - Cannot connect to the docker socket. Cannot proceed

I tried to install docker with Nextcloud AIO for home use. I get this error message:
“Cannot connect to the docker socket. Cannot proceed.”

Here were my steps:

  1. Installed Docker Desktop for Windows, selected WSL2.
  2. Updated the WSL2 kernel.
  3. Installed Nextcloud AIO using these commands in command prompt (as administrator).
    docker run ^
    –sig-proxy=false ^
    –name nextcloud-aio-mastercontainer ^
    –restart always ^
    –publish 80:80 ^
    –publish 8080:8080 ^
    –publish 8443:8443 ^
    –volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config ^
    –volume //var/run/docker.sock:/var/run/docker.sock:ro ^
    -e NEXTCLOUD_DATADIR=“/run/desktop/mnt/host/c/ncdata” ^
    nextcloud/all-in-one:latest

I got error message that cannot connect to the docker socket. Cannot proceed.

in Docker Desktop i also get the same error.

Any thoughts how to solve this?

if you fixed please help me to fix it

We are experimenting the same issue as of 2024.02.16

Running this on cmd.exe as admin:
docker run ^
–init ^
–sig-proxy=false ^
–name nextcloud-aio-mastercontainer ^
–restart always ^
–publish 80:80 ^
–publish 8080:8080 ^
–publish 8443:8443 ^
–volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config ^
–volume //var/run/docker.sock:/var/run/docker.sock:ro ^
nextcloud/all-in-one:latest

Results in “Docker socket is not available. Cannot continue.”

We have tried on Windows 10 Pro - one fresh install with updates and on Windows Server 2022