-
Notifications
You must be signed in to change notification settings - Fork 822
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run windows containers from WSL2 ? #6742
Comments
As a workaround, what if you use It won't work to access the docker socket at "tcp://localhost" because the WSL2 environment has a different IP address than Windows. You can get the IP of the Windows host using a method like this: #4619 (comment) That might allow you to access the docker socket over the network like that. |
I have tried using the ip of windows and 2375 is not available
|
Is the problem perhaps that its being firewalled? |
I added a firewall rule for 2375, all nets, all interfaces, on windows I can connect to localhost:2375 but not the wsl ip because it is only being shared on localhost |
adding this port forward
allows me to switch to windows containers and start them from WSL2 when specifying the -H tcp://172.25.208.1:2375 |
Environment
Steps to reproduce
I will apologize for asking this question in the form of a bug report but i have spent the better part of a day trying to find a solution with no luck, all the articles i have found are about running linux containers.
I am attempting to run windows based containers from wsl2, I am doing both linux and windows development but i prefer to work in WSL. I can run linux containers from windows and WSL2 but I want to test a chef cookbook on windows from WSL.
I have tried switching to windows containers and If i remove the WSL2 integration i get
docker not found
if i enable the WSL2 integration i get
docker does not seem available to WSL via the network i.e tcp://localhost:2375 ( i have enabled that via docker desktop).
also from test-kitchen if i try to start the windows machine i get
TIA
The text was updated successfully, but these errors were encountered: