First enable windows subsystem for linux (WSL)
- Enable Windows Subsystem for Linux
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- Enable Virtual Machine
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- Install
podmandesktop from podman.io - Install visual studio code (
vscode) from https://code.visualstudio.com/ - Add extension dev containers to
vscodeDev Containers - Visual Studio Marketplace -
Update the
vscodeextensiondev containerssettings to point topodmaninstead ofdocker- Press
F1 - Enter
Dev Containers: Settingsin the prompt - And set the value of
dev.containers.dockerPathto podman
- Press
Close
vscodeand open it again-
To verify if all the settings are done correctly:
- Open a
powershellterminaland executepodman pull python:3.11.4 - Execute
podman run -it python:3.11.4 python - Do not close the terminal and let it run
- Open a
Connect to the running container from vscode
-
Open
vscodeand look for the><in the bottom left hand side corner and click on it -
It shall open a dialog on the top of the window and select
Attach to Running Container… -
Wait for vscode to show the running containers
Select the container required and you are all set to work inside the container.
vscodewill open a new window and connect to the container selected.-
Once the new vscode window opened select a folder inside the continaer
You are now connected to the container from
vscode!





Top comments (2)
Thank you very much, very well explained, it helped me today 08/25/2024. I write the date because it was very difficult for me to find a tutorial that would work for the new versions of podman (version 5.2.2)
In my case it did work because the folder I wanted to access did contain code.
Any idea how to get it to work with Visual Studio? The one that is not code ;)
Building in VS fails to add the container to the podman local images.