Skip to content
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

Hook into existing WSL distribution #19273

Closed
markfaine opened this issue Jun 22, 2023 · 12 comments
Closed

Hook into existing WSL distribution #19273

markfaine opened this issue Jun 22, 2023 · 12 comments
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@markfaine
Copy link

Is your enhancement related to a problem? Please describe

I already have a WSL distribution that I use every day and it has all of my tools and git projects, etc. It is my primary working environment. I can't imagine that I would want to use podman/podman desktop if I have to launch a separate WSL distribution every time I want to issue a podman command or do anything related to container work.

Describe the solution you'd like

I would like for it to work the way that Docker Desktop works. I'd rather not have to run both Podman Desktop and Docker Desktop, and from what I've seen that doesn't work anyway, though it should. WSL supports systemd natively so there is no need to launch a subprocess for systemd. Just hook into an existing WSL distribution (Ubuntu) the same way that Docker Desktop does it now.

Describe alternatives you've considered

Just using Docker Desktop

Additional context

No response

@therevoman
Copy link

Please do not make this the default. I do not want podman desktop touching my existing WSL distro.

@benoitf
Copy link
Contributor

benoitf commented Jun 23, 2023

hello @markfaine the 'podman machine' CLI is not only starting a VM but it also responsible to bind on the host a npipe that redirects to the socket in the WSL2 podman. (and also provide the docker npipe for compatibility for tools using the docker default npipe)

If you don't use the 'podman machine', then it would be your responsability to provide that npipe so Podman Desktop could connect to it

@markfaine
Copy link
Author

Thanks for the reply, I admit I don't understand the technical implementation details. I do know that other tools are able to do something similar using a distribution. For example, wslvpnkit and the docker desktop implementation are able to accomplish a similar integration without the need for this. Anyway, if it's possible, it's a request, if you can't do it, I understand. On a related note, the npipe starts up in a separate terminal window in the foreground and I don't think that was intended?

@benoitf
Copy link
Contributor

benoitf commented Jun 25, 2023

@markfaine could you please describe or provide a link on how wslvpnkit or Docker Desktop are exposing this setting to the users ?

@markfaine
Copy link
Author

Sorry, I don't actually know how they do it, I only use the tools.

Here are some links that may be useful:

More technical information for the Docker desktop WSL2 integration is here:

Again, I'm just a user of this application and while It appears to me that wsl-vpnkit is a more specialized use case it does demonstrate that communication between a WSL distribution (Ubuntu), the wsl-vpnkit distribution, and Windows can be achieved transparently to the user.

If it wasn't for this tool, connecting to my VPN with the cisco vpn client will break network communication inside WSL. From the documentation linked above, it also appears that vpnkit (the project that wsl-vpnkit is based on) is also used by Docker Desktop for a similar purpose.

@Zeratoxx
Copy link

Zeratoxx commented Jul 18, 2023

@markfaine could you please describe or provide a link on how wslvpnkit or Docker Desktop are exposing this setting to the users ?

@benoitf Docker Desktop offers settings in its GUI
grafik

@gbraad
Copy link
Member

gbraad commented Jul 18, 2023

https://github.com/sakai135/wsl-vpnkit

This is not necessary anymore. We have worked with him and upstreamed a lot of the code back to our gvisor usermode networking stack, and it is now possible to enable Usermode networking from Podman machine on Windows (WSL). For this, see: podman-desktop/podman-desktop#3052

@benoitf benoitf transferred this issue from podman-desktop/podman-desktop Jul 18, 2023
@benoitf
Copy link
Contributor

benoitf commented Jul 18, 2023

transferring the issue to podman repository as the handle of machines is handled by this repository

@rhatdan
Copy link
Member

rhatdan commented Jul 18, 2023

@markfaine you would be responsible to make sure the podman version inside of the WSL2 is matching the podman and podman desktop version on Windows.

If you are using a distribution that is not staying up to date with versions of Podman (Ubuntu?) then this could become a problem.

@rhatdan
Copy link
Member

rhatdan commented Jul 18, 2023

@n1hility @baude WDYT?

This would also require you to setup a podman connection.

@n1hility
Copy link
Member

@markfaine Docker Desktop does actually work this way as well. It sets up its own WSL distro (two of them - see wsl -l), but does additionally install packages for clients on the ubuntu distro. We have a feature request to publish the podman.sock to a shared mount so that other distros can easily communicate with it. #15190

Closing this one as a duplicate since it sounds like that issue would address the use case

@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Podman Desktop Planning Jul 24, 2023
@markfaine
Copy link
Author

This sounds like a good solution. I just don't want to have to maintain a completely separate environment just for working with podman, however that is resolved doesn't mater much to me.

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Oct 28, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
Archived in project
Development

No branches or pull requests

7 participants