Making Docker tools work with Podman on Windows
I like Podman, because it’s a daemonless container engine. There are many reasons to use Podman instead of Docker, and the most important are:
- Podman doesn’t require a daemon to run containers. Which means you can run containers without root privileges.
- Podman is a drop-in replacement for Docker. You can use Podman commands instead of Docker commands.
- Podman is more secure than Docker. It uses the same container runtime as Docker, but it doesn’t require a daemon to run containers.
- Podman is more lightweight than Docker. It doesn’t require a daemon to run containers, so it uses less memory and CPU.
But I also like Docker, because it’s the most popular container engine. So I want to use Docker tools with Podman. Here’s how I made it work on Windows.
Download Docker CLI tools
I have tried to make a hard link docker.exe <-> podman.exe
and although it did work for the command line, it wasn’t enough for tools like Visual Studio or Visual Studio Code. They still either didn’t recognize the docker
command or didn’t work properly with it.
The only option that worked for me was to download the Docker CLI tools from the Docker website. You can download them from the official website’s page, although for some reason it’s not advertised. Just extract docker.exe
and dockerd.exe
into a folder that is in your PATH.
Enable Docker compatibility in Podman
There is a setting in Podman that allows you to enable Docker compatibility. You can enable it in settings as shown here:
Done
Now it works in Visual Studio:
and VS Code:
It probably means that both IDEs are directly invoking docker.exe
as a subprocess and parsing the output (in fact I have proven this is true by debugging with procmon
). Anyway, it works and that’s what matters.
To contact me, send an email anytime or leave a comment below.