-
Notifications
You must be signed in to change notification settings - Fork 302
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
Support for podman inside of WSL2 #5539
Comments
Further looking into it, it looks like when the folder your trying to open is on the WSL2 filesystem the dev container is already routed through WSL2 directly and podman already works. So this is an easy existing solution for people. But it seems when the folder is on the Windows filesystem remote containers always tries to use windows commands to launch and does not work. Maybe there would be a way to configure how the remote container is launched? That may have connotations on ssh agent forwarding and env vars though I suppose. I just have some users that aren't as comfortable with running linux and I'm seeing if I can give them a solution that works as closely with Windows as I can. |
I don't think Podman can mount a Windows folder (please check, I'm not sure), so your users will probably have to use the WSL filesystem. |
Btw., I'm not sure if Docker CLI packages for Linux/WSL are affected by the Docker Desktop change. |
Note that doing this is discouraged by MS anyway because the file system performance will be really bad. |
I found it quite hard getting podman to work actually. You need to follow these: The big problem is that performance is really bad by default cause of fuse-overlayfs: And the weird default user id mapping was another big problem: "remoteUser": "vscode",
"runArgs": [
"--userns=keep-id"
], And in the end it'll still use cgroups v1 it seems cause of microsoft/WSL#6662 (comment) |
I was able to mount it through the wsl c mount.
That is how I understand it. May be a better route to just install Docker CLI on windows. When I was researching that some sites suggested trying out podman instead.
Agreed, but I'm going for ease of use, not performance.
Those are good resources and the main ones I was looking at. So far is has performed well for the use cases I have. |
Let's also separate this request a bit from Docker Desktop since Docker CE/EE (or Moby if you build it) can run in WSL as well w/o Docker Desktop (among other solutions that have been discussed in the containers community like nerdctl, just using a Minikube cluster plus the Docker CLI, etc). Organizations need to decide what they are comfortable with doing beyond what they do now. What #5538 is talking about the install prompt that appears and whether we should reconsider that, but as stated there, there is not a drop-in alternative for Docker Desktop itself which targets broad support and is more than just the Docker CLI and Engine. That said, this is a 100% fair request - Podman was a great available alternative to the Docker/Moby CLI/Engine before and still is for those wanting to use containers on Linux (including WSL). I think Podman advocates wanted WSL support before, and still do after this announcement - which is great. But as you point out, the filesystem is effectively the one in WSL, not in Windows. The mounts are the way to access the Windows filesystem. Unfortunately, installing the Docker CLI on Windows itself doesn't help since the thing that is missing is the clean filesystem translation that exists in Docker Desktop. The Podman project would need to provide some translation here to make this native or their own Docker Desktop-like solution, or first class WSL support to handle some of this (e.g. the systemd point). Right now you can use the Remote - WSL extension, open a |
Not hard! Podman uses FUSE to mount volumes, i.e. the abstraction level that allows mounting and see any type of filesystem as a single FS in the userspace. The recent Docker version does the same. It simply works. |
I don't know, it was a PITA from beginning to end on WSL. Even after finally getting it to run (see above) the performance was really bad (even simple commands and auto-complete take a long time to run, esp. after startup) and it started making other problems like suddenly failing on container exit with Docker is a better alternative. |
Stack Podman 3.3 + Fedora34 WSL distro + systemd-genie 1.40 (avoiding root privs usage) + buildah 1,2 ( for image configuration w/o rebuild) + certain set of systemd units to hands-free dev env starting (Theia) + Network configuration necessary for working in the double stack Internet infra with local forwarder + published Docker REST API (usable for self-update) works OK. |
@bmayfi3ld I'm adding a user setting to always run commands in WSL, also for Windows paths and when there is no local path when attaching to an existing container. |
@Trass3r, setting up Podman on WSL becomes really easy if Systemd is setup 😉. Then |
@chrmarti are there specific verification steps for this issue, or is it covered by the TPI? |
The steps are slightly different:
Reset the |
Due to the new licensing from Docker, Docker Desktop may not be a desired solution for many businesses.
Since podman is already able to run inside WSL2 and it is supported on Linux Machines. I wonder if it could be adapted to be used on Windows.
Easiest setup would to be able to handle the call to the podman executable inside of WSL2 from Windows, which is done with the command
So in the config you could update the path to be "wsl podman"
I of course don't know if there would be other issues with attaching and mounting to the container.
Similar to issue #5538 which references the new licensing as a problem for MacOS as well.
The text was updated successfully, but these errors were encountered: