Podman 4.3 on Windows 10: Install
Tags: podman, docker, kubernetes, virtualization
Published: 2023-01-21 13:18:25

## Summary

[Podman](https://podman.io/) is an engine for virtualization to create and maintain containers on virtual machines. It is developed by [Red Hat](https://www.redhat.com/) and [published](https://github.com/containers/podman) as an open source software (OSS) under [Apache License v2.0](https://www.apache.org/licenses/LICENSE-2.0.html). The source code is written in [Golang](https://go.dev/).

It is cross-platform and therefore able to be installed on any of [Windows](https://www.microsoft.com/windows/) / [Mac](https://support.apple.com/macos) / [Linux](https://www.linux.org/).
This must be one of their advantages. Supposed that some files defining a virtual machine or a [pod](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/) (of [Kubernetes](https://kubernetes.io/)) for grouping ones are delievered, we can develop on the same virtual enviroment with defferent workstations.

As to containerization, [Docker](https://www.docker.com/) 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`](https://docs.docker.com/engine/reference/builder/) but also introduce images hosted on [Docker Hub](https://hub.docker.com/). Therefore, when trying to migrate from Docker, it may not be so difficult.

Well, installing it on Windows requires activation of [WSL](https://learn.microsoft.com/windows/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](https://github.com/containers/podman/releases/tag/v4.3.1)

## Tutorial

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

### Package manager installation (Optional)

What I used was [Scoop](https://scoop.sh/). It is a third-party package manager for Windows. It enables us to install and uninstall packages in a clean way.

Alternatively, [winget](https://learn.microsoft.com/windows/package-manager/winget/) is also available. Podman package for it is [published](https://winget.run/pkg/RedHat/Podman) by the company.

### Podman installation

In case of Scoop, run:

```console
$ scoop install podman
```

The output was:

```console
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!
```

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](https://github.com/containers/podman/releases/tag/v4.3.1).

### 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:

```console
$ podman machine init
```

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

![alert by windows defender firewall](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t6fsu8zcc59qpxyq42u3.png)

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](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dpfxvomb4fpysglztpcn.png)

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
```

Choose "Yes" to go on.

The installation will start as below.

![wsl installation - before OS reboot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/61pxnj1zjxbz10cmw4lx.png)

#### Note: Recommended terminal

When [Command Prompt](https://learn.microsoft.com/windows-server/administration/windows-commands/cmd) is the default, you will see the garbled as above.
According to the official tutorial, [Windows Terminal](https://learn.microsoft.com/windows/terminal/) is [recommended](https://github.com/containers/podman/blob/main/docs/tutorials/podman-for-windows.md#prerequisites) 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](https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701).

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

![confirmation of os reboot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qptw1fp0xb8uvhwebqip.png)

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](https://learn.microsoft.com/windows-server/administration/windows-commands/powershell) will follow:

![wsl installation - kernel installation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nkeb5osbqjswuqc0589e.png)

Moreover, another command prompt will follow:

![wsl installation - kernel update](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zm9mfj01cd5g54icci2w.png)

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
```

Click "Yes" as before.

### Completion of Podman installation

Installation of WSL kernel will start and finish.

![podman on windows - ready](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9fjm7hf61xfhnav1wfdj.png)

## 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.