0

I am unable to mount docker.sock when creating a container in WSL 2:

-v /var/run/docker.sock:/var/run/docker.sock

I get the following error:

docker: Error response from daemon: not a directory.

When navigating to /var/run, I can clearly see docker.sock being present, so I am unsure about why I am getting this error. docker ps correctly shows all the running containers.

Any help would be greatly appreciated!

CS1999
  • 23
  • 5

1 Answers1

0

Try to create a volume by passing this flag to the docker run command:

-v //var/run/docker.sock:/var/run/docker.sock

Alessandro Argentieri
  • 2,901
  • 3
  • 32
  • 62