Podman is a deamonless container engine for developing, managing, and running OCI Containers on your Linux System.
Podman
Podman installation instructions (eg: Windows w/ WSL 2)
https://podman.io/getting-started/installation
Update installation instructions to use podman in a WSL machine
https://github.com/containers/podman.io/issues/431
a) Install podman
sudo apt update && sudo apt -y install podman
b) Emulate Docker CLI using podman
sudo apt install podman-docker && sudo touch /etc/containers/nodocker
a)Add the Podman PPA and install Podman
. /etc/os-release
sudo sh -c "echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/x${NAME}_${VERSION_ID}/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list"
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/x${NAME}_${VERSION_ID}/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo apt-get update -qq
sudo apt-get -qq -y install podman
sudo mkdir -p /etc/containers
echo -e "[registries.search]\nregistries = ['docker.io', 'quay.io']" | sudo tee /etc/containers/registries.conf
b)Rootless configuration file changes
sudo nano /usr/share/containers/containers.conf
Change the value of events_logger to:
events_logger = "file"
c1) Emulate Docker CLI using podman
sudo apt install podman-docker
sudo touch /etc/containers/nodocker
c2) (Avoid it, use it only as alternative to the 'podman-docker' package) Symlink docker to podman
(only if podman-docker doesn't work) sudo ln -s /usr/bin/podman /usr/bin/docker
Note: Aliases aren't picked up by shell scripts
Execute:
docker run hello-world
Or, if not symlink docker->podman has been created:
podman run hello-world
Neither 'Podman Compose' nor 'Docker Compose ' is affiliated with Podman (Podman Compose is a community project, not directly maintained by the Podman team).
Note: Docker Compose, as Docker itself, needs a license for commercial use.
Podman is hard at work at work on podman generate kube and podman play kube, which allow Kubernetes YAML to be used directly with Podman.
>"Podman Compose or Docker Compose: Which should you use in Podman?" (June 17, 2022 )
https://www.redhat.com/sysadmin/podman-compose-docker-compose
>podman-play-kube ubuntu manpage
https://manpages.ubuntu.com/manpages/jammy/man1/podman-play-kube.1.html
On Windows 11 WSL2 w/ Ubuntu 22.04 using podman 3.4.2
Workaround is to switch back to iptables-legacy:
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
Just a warning, ignore it if everything works fine. It might affect mounting filesystems. Warning appeared using Podman [3.4.2 .. 4.9.3]. The solution might be (UNTESTED):
sudo mount --make-rshared /
Error message appeared in Windows 11 w/ WSL and WSLg using Ubuntu 24.10 and Podman 4.9.3. Solution:
sudo mkdir /run/user/1000 && sudo chown 1000:1000 /run/user/1000
Error message appeared in Windows 11 w/ WSL and WSLg using Ubuntu 24.04 and Podman 4.9.3. Workaround:
#Get user id, eg: 1000, using: id -u
sudo loginctl enable-linger 1000
wsl --shutdown from PowerShell/CMD
#Optional, verify:
loginctl show-user <your_username> | grep Linger
#It should output Linger=yes