vscode-docker icon indicating copy to clipboard operation
vscode-docker copied to clipboard

Support rootless, daemonless podman inside WSL

Open Clockwork-Muse opened this issue 4 years ago • 21 comments

Since the changes to Docker's licensing, I've been looking at using Podman to run my devcontainers instead of Docker. There's a couple of wrinkles to this, however; by default Podman is daemonless, and doesn't have a running service. This is actually a benefit to running in WSL (which doesn't have systemd by default), but means that accessing it via a remote CLI requires setting up a bunch of other services.

My preferred setup would be;

... and have everything "just work" (ie, container and image list).

The remote-containers extension solved this by running cli commands inside WSL.

Clockwork-Muse avatar Sep 27 '21 04:09 Clockwork-Muse

There are many benefits in using rootless Podman but not listed above:

  1. Podman is serverless but not serviceless. Podman service can be started as systemd service. It can run every container as a service root or rootless.
  2. Systemd is a part of most Linux distros supported by Podman.WSL doesn't use systemd as a init system but the ways to do it exist: systemd-genie from Arkane system.
  3. Podman is the CLI toolset that consists of Podman, Buildah, and Skopeo packages that speed up Image development.
  4. It is not scalable - using one Podman by several users in parallel is hardly possible. Every regular Linux desktop GUI or remote user has all resources available for his/her user session unless the container uses the system resources available only to root.
  5. Podman remote client and Docker client have many common features but the key features used in the development are completely different. Service point configuration is different.
  6. Podman REST API extends Docker REST API but they are not equivalent. It doesn't ensure that Docker's client will work exactly in the same way with Podman and Docker including storage, networking, SSH support, port forwarding via docker-proxy, etc. Podman offers a very fast and convenient but very minimalistic runtime with a focus on image and pod development.

PavelSosin-320 avatar Oct 03 '21 05:10 PavelSosin-320

I think we will need to work on as generic a solution as possible given the variety of container runtimes possible.

bwateratmsft avatar Oct 04 '21 14:10 bwateratmsft

Probably related to #3263.

bwateratmsft avatar Nov 09 '21 15:11 bwateratmsft

Is there any chance to just run commands in WSL, as it's possible with the remote-containers extension, too?

image

jankap avatar May 19 '22 12:05 jankap

@jankap You may find some success with the docker.dockerPath setting, e.g. setting it to something like "\"wsl -- docker\"", but I'm not completely sure. It is something we are actively working on.

bwateratmsft avatar May 19 '22 12:05 bwateratmsft

whats the status on this. I am still trying to get the docker extension work with podman on windows ?

sd37 avatar Aug 18 '23 00:08 sd37

gudge25 avatar Sep 07 '23 12:09 gudge25

is there any update on this ?

the last docker extension working with podman for me is v1.22.2. I have to downgrade to this version to keep podman working

I am running the latest podman version version 4.5.1 within the wsl2

nqdrizzt avatar Oct 26 '23 13:10 nqdrizzt

My podman version is 4.7.1 also got same issue, need downgrade to docker extension v1.22.2

chenwei791129 avatar Oct 26 '23 15:10 chenwei791129

Can confirm that the issue is still present and only reverting to v1.22.2 works

FancyBanana avatar Nov 09 '23 18:11 FancyBanana

I can confirm that podman in wsl2 with debian bookworm is only running on docker extension 1.22.2 and below.

podman version Client: Podman Engine Version: 4.5.1 API Version: 4.5.1 Go Version: go1.19.8 Built: Thu Jan 1 01:00:00 1970 OS/Arch: linux/amd64

vscode on nightly build

nqdrizzt avatar Nov 10 '23 07:11 nqdrizzt

Still an issue Jan 2024. Downgrading to extension version 1.22.2 works.

godefroi avatar Jan 23 '24 14:01 godefroi

@jankap You may find some success with the docker.dockerPath setting, e.g. setting it to something like "\"wsl -- docker\"", but I'm not completely sure. It is something we are actively working on.

I tried setting docker.dockerPath to \"wsl --distribution podman-machine-default -- docker\" but the extension simply told me that Docker wasn't installed and I got the "unable to connect" messages in the container/image lists

godefroi avatar Jan 23 '24 15:01 godefroi

It is a pity that this problem is still not solved and we have to use an outdated version of the plugin.

mash-graz avatar Feb 14 '24 06:02 mash-graz

Hey everybody, I know there's some excitement around this, so I wanted to give a quick update to set expectations. This work is in the current milestone; however, some high priority tasks have come up which have redirected the engineering team so it will be a while still before it ships.

I just wanted you all to know that we hear how important this is and we'll have a solution as soon as we can. I'll keep this issue updated as we make progress.

fiveisprime avatar Feb 28 '24 19:02 fiveisprime