DEV Community


Posted on • Updated on

How to use PODMAN in place of docker in windows?

First enable windows subsystem for linux (WSL)

  1. Enable Windows Subsystem for Linux
    • dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
  2. Enable Virtual Machine
    • dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
  3. Install podman desktop from
  4. Install visual studio code (vscode) from
  5. Add extension dev containers to vscode Dev Containers - Visual Studio Marketplace
  6. Update the vscode extension dev containers settings to point to podman instead of docker

    1. Press F1
    2. Enter Dev Containers: Settings in the prompt
    3. And set the value of dev.containers.dockerPath to podman

    docker path

  7. Close vscode and open it again

  8. To verify if all the settings are done correctly:

    1. Open a powershell terminal and execute podman pull python:3.11.4
    2. Execute podman run -it python:3.11.4 python
    3. Do not close the terminal and let it run

Connect to the running container from vscode

  1. Open vscode and look for the >< in the bottom left hand side corner and click on it

    vscode remote

  2. It shall open a dialog on the top of the window and select Attach to Running Container…

    prompt to connect

  3. Wait for vscode to show the running containers

    running containers

  4. Select the container required and you are all set to work inside the container.

  5. vscode will open a new window and connect to the container selected.

  6. Once the new vscode window opened select a folder inside the continaer

    Image description

  7. You are now connected to the container from vscode!

Top comments (0)