Podman 4.3 on Windows 10: Install

nabbisen - Jan 21 '23 - - Dev Community

Summary

Podman is an engine for virtualization to create and maintain containers on virtual machines. It is developed by Red Hat and published as an open source software (OSS) under Apache License v2.0. The source code is written in Golang.

It is cross-platform and therefore able to be installed on any of Windows / Mac / Linux.
This must be one of their advantages. Supposed that some files defining a virtual machine or a pod (of Kubernetes) for grouping ones are delievered, we can develop on the same virtual enviroment with defferent workstations.

As to containerization, Docker is very popular now.
Podman is developed with mind to make it compatible with Docker, the wonderful one used really widely. Especially, it is highly compatible since v3. With it, you can not only use existing Dockerfile but also introduce images hosted on Docker Hub. Therefore, when trying to migrate from Docker, it may not be so difficult.

Well, installing it on Windows requires activation of WSL (Windows Subsystem for Linux) v2. Thankfully, Podman starter deals with it almost automatically.

Here, how to install Podman on Windows 10 will be shown.

Environment

  • OS: Windows 10
  • Virtualization: Podman 4.3.1

Tutorial

* The screenshots were taken under where the locale was set to Japanese.

Package manager installation (Optional)

What I used was Scoop. It is a third-party package manager for Windows. It enables us to install and uninstall packages in a clean way.

Alternatively, winget is also available. Podman package for it is published by the company.

Podman installation

In case of Scoop, run:

$ scoop install podman
Enter fullscreen mode Exit fullscreen mode

The output was:

Installing 'podman' (4.3.1) [64bit] from main bucket
podman-4.3.1-setup.exe (30.3 MB) [============================================================================] 100%
Checking hash of podman-4.3.1-setup.exe ... ok.
Running installer script...
Linking ~\scoop\apps\podman\current => ~\scoop\apps\podman\4.3.1
Creating shim for 'podman'.
'podman' (4.3.1) was installed successfully!
Enter fullscreen mode Exit fullscreen mode

Besides, in case of winget, run winget install -e --id RedHat.Podman.

Also, without package managers, the installers for Windows are available. You can get them by downloading files named podman-#.#.#-setup.exe in Github releases.

OS configuration for Podman

After Installing Podman package, what to do next is configure it.
It is configuration of a virtual machine that is essential. However, if WSL v2 is not ready, it also helps us to install and configure it.

Run the command line below:

$ podman machine init
Enter fullscreen mode Exit fullscreen mode

You will see the alert by Windows Defender Firewall to confirm which network connection(s) you permit.

alert by windows defender firewall

The following events occur in case that WSL v2 is not ready.

It says it found WSL was not installed. Click "OK", and the intallation will start.

podman's confirmation - if you install wsl or not

Then "User Account Control" will be shown by Windows. The below is the content.

User Account Control
Do you want to allow this app to make changes to your device?

podman.exe

Verified publisher: Red Hat, Inc
File origin: Hard drive on this computer

Show more details
Yes No
Enter fullscreen mode Exit fullscreen mode

Choose "Yes" to go on.

The installation will start as below.

wsl installation - before OS reboot

Note: Recommended terminal

When Command Prompt is the default, you will see the garbled as above.
According to the official tutorial, Windows Terminal is recommended because of the usefulness. (The lack of it will not probably bring anything fatal for now.) You can get and install it in Windows Store.

Well, the installation will go on, and you will see confirmation of reboot:

confirmation of os reboot

Reboot the machine by clicking "OK".

After OS reboots, sign in and wait one or two minutes. (It's because the rest of installation of WSL follows the completion of some start-up items Windows intentionally delays.)

Command prompt will automatically start and quit three times. Then automatically starting PowerShell will follow:

wsl installation - kernel installation

Moreover, another command prompt will follow:

wsl installation - kernel update

After them, you will see confirmation of "User Account Control" on podman.exe.
Click "Yes" to go ahead.

Then you will see another confirmation on "Host Process for Windows Services":

User Account Control
Do you want to allow this app to make changes to your device?

Host Process for Windows Services

Verified publisher: Microsoft Windows

Show more details
Yes No
Enter fullscreen mode Exit fullscreen mode

Click "Yes" as before.

Completion of Podman installation

Installation of WSL kernel will start and finish.

podman on windows - ready

Conclusion

Podman is now ready !!

Running podman machine start will bring you its virtual machine working. (Besides, initialization will take time a little at the first execution.) With it, you can manage containers and their images with the command lines similar to those of Docker.

Podman is developed with mind of security and stablity. First, Podman is daemon-less. The containers on the virtual machine benefit from it, for they are not often affected by another. Additionally, they are rootless by default, which makes running them more secure.

Hope that Podman brings environments which are reusable and isolated as possible, and you get advanced productivity or operation.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .