Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Podman isn't working in Remote Containers in Windows?

Any hints on why Remote - Containers isn't working with podman on Windows?

  • Installed podman v4.2.0 on Windows 11 via .msi package

  • Set remote.containers.dockerPath to podman in VS Code Settings

  • Run podman machine init

  • Run podman machine start

  • Open Remote Explorer in VS Code and be presented with the following:

    Remote Explorer in VS Code

Everything is working with podmanpull, run, images, etc, but Remote - Containers on VSCode doesn't recognize podman.

After running Remote-Containers Developer: Show All Logs... in VS Code:

[2022-08-21T12:55:15.916Z] Start: Run: podman version --format {{.Server.APIVersion}}
[2022-08-21T12:55:16.080Z] Stop (164 ms): Run: podman version --format {{.Server.APIVersion}}
[2022-08-21T12:55:16.080Z] Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM
Error: unable to connect to Podman. failed to create sshClient: dial unix \\.\pipe\openssh-ssh-agent: connect: No connection could be made because the target machine actively refused it.

And podman system connection list in a terminal:

Name                         URI                                                          Identity                                      Default
podman-machine-default       ssh://user@localhost:62078/run/user/1000/podman/podman.sock  C:\Users\Edmundo\.ssh\podman-machine-default  true
podman-machine-default-root  ssh://root@localhost:62078/run/podman/podman.sock            C:\Users\Edmundo\.ssh\podman-machine-default  false

Related Issues: #6957, #6747.

like image 937
mdmundo Avatar asked Dec 11 '25 04:12

mdmundo


1 Answers

in a WSL shell, i.e. for debugging try this

first - try to start podman podlib REST api (for socket, lifetime 5000 sec. - set to zero for "forever")

podman system service -t 5000 &

then symlink the podman.sock to the location vscode expects:

sudo ln -s /mnt/wslg/runtime-dir/podman/podman.sock /var/run/docker.sock

if none of that works, would you mind posting a dump:

podman info

HINT: check the podman info YAML output for host | remoteSocket | path & make sure it matches the path /mnt/wslg/runtime-dir/podman/podman.sock above.

like image 136
Brian Horakh Avatar answered Dec 14 '25 10:12

Brian Horakh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!