install podman on wsl2

Step install podman on wsl2

  1. Check version id (VERSION_ID)
1
2
3
$
$ cat /etc/lsb-release
$

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION=”Ubuntu 18.04.5 LTS”

=> DISTRIB_RELEASE is VERSION_ID

2. Run add sources list

1
2
3
$
$ echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
$

3. Run apt-key

1
2
3
$
$ curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_18.04/Release.key | sudo apt-key add -
$

4. Run update and upgrade

1
2
3
$
$ sudo apt-get update && sudo apt-get -y upgrade
$

5. Install podman

1
2
3
$
$ sudo apt-get -y install podman
$

Exanple command

Check version

1
2
3
$
$ podman version
$

Version: 3.0.1
API Version: 3.0.0
Go Version: go1.15.2
Built: Thu Jan 1 07:00:00 1970
OS/Arch: linux/amd64

View images

1
2
3
$
$ podman images list
$

View container

1
2
3
$
$ podman ps -a or podman container list
$

Leave a Reply