on windows, run the following command:
docker run -d --name unix-connect --restart=always -p 127.0.0.1:23750:2375 -v /var/run/docker.sock:/var/run/docker.sock alpine/socat tcp-listen:2375,fork,reuseaddr unix-connect:/var/run/docker.sock
Then, add this line at the end of your .zshrc
or .bashrc
file:
export DOCKER_HOST=tcp://127.0.0.1:23750
Launch a new terminal or source the file we updated, and now you should see your containers when running docker ps
inside wsl2