If you're looking for a lightweight and daemonless alternative to Docker on Windows, Podman is a great choice. This guide walks you through installing Podman on Windows, setting up Podman Compose, and configuring it to work seamlessly with the Docker CLI.

1. Installing Podman Desktop and Podman on Windows

Podman provides a user-friendly desktop application along with the command-line tool. To install it:

  1. Navigate to the official Podman Desktop installation guide.
  2. Follow the instructions to download and install Podman Desktop and Podman CLI.

After installation, ensure that Podman is added to your system PATH and verify the installation:

podman --version

2. Setting Up Podman Compose

Podman Compose allows you to run multi-container applications using docker-compose.yml files. To set it up:

  1. Follow the official Podman Compose setup guide.
  2. Verify the installation:
podman-compose --version

3. Installing Docker CLI

While Podman provides a Docker-compatible command-line interface, some tools may still require the Docker CLI. You can install it using Windows Package Manager winget:

winget install Docker.DockerCLI

4. Creating a Symlink for Docker Compatibility

To make the Docker CLI use Podman under the hood, create a symbolic link:

  1. Open a PowerShell console and navigate to the WinGet links directory:
cd C:\Users\<currentuser>\AppData\Local\Microsoft\WinGet\Links
  1. Rename the original Docker executable:
rename docker.exe docker-ori.exe
  1. Create a symbolic link to the Podman executable:
New-Item -ItemType SymbolicLink -Path "docker.exe" -Target "C:\Program Files\RedHat\Podman\podman.exe"

Replace with your actual Windows username.

5. Configuring User Permissions

To ensure Podman works properly with the Docker CLI, verify and configure the docker-users group:

  1. Check Available Local Groups: Run the following command to list all local groups:
net localgroup

Look for docker-users in the list.

  1. Create the 'docker-users' Group (if it doesn't exist): If the docker-users group is not listed, create it using:
net localgroup docker-users /add
  1. Add Your User to 'docker-users' Group: Run the following command, replacing YourUsername with your actual Windows username:
net localgroup docker-users YourUsername /add
  1. Log Out and Log Back In This ensures that the group changes take effect.

6. Restart Windows

To ensure all changes take effect, restart your system.

7. Verify Docker Compatibility

After restarting, open PowerShell and check if the docker command now points to Podman:

docker --version

If everything is set up correctly, you should see a version message from Podman.

Conclusion

Congratulations! You've successfully replaced Docker with Podman on Windows. This setup allows you to run containerized applications while maintaining compatibility with existing Docker-based workflows.

For more details, refer to the official Podman documentation.