Install Podman, Buildah, and Skopeo on Ubuntu 18.04

Install podman and the gang

Execute the following commands to install podman, buildah, and skopeo from Kubic package repository.

. /etc/os-release
echo "deb${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
curl -L${VERSION_ID}/Release.key | sudo apt-key add -
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install podman buildah skopeo

Install slirp4netns

In order to forward ports from container run by podman, you need to install slirp4netns by downloading the executable binary into a directory.

LATEST_VERSION=$(curl -s | jq -r '.tag_name')
curl -fL -o slirp4netns${LATEST_VERSION}/slirp4netns-$(uname -m)
chmod +x slirp4netns

Add the directory into PATH variable by appending this line to shell init script (e.g. ~/.bashrc or ~/.zshrc) and restart the shell or source it.

export PATH=/path/to/binaries:$PATH

Test podman

Run a httpd container and forward port 8080 -> 18080

podman run -dt -p 18080:8080/tcp

If you see the error ERRO[0001] unable to write pod event: "write unixgram @00018->/run/systemd/journal/socket: sendmsg: no such file or directory", you seem to run podman in WSL2. Then you need to use the flag --events-backend=file to suppress this error:

podman run -dt -p 18080:8080/tcp --events-backend=file

Check the container status

podman ps

Podman will search in default registries if you don't specify full image name. The default registries are defined in /etc/containers/registries.conf. You can use command podman info to see the list of registries.

You should see the container's name and its status should be up like this:

CONTAINER ID  IMAGE                                 COMMAND               CREATED         STATUS            PORTS                    NAMES
6ffe71fff383  /usr/bin/run-http...  44 seconds ago  Up 5 seconds ago>8080/tcp  priceless_saha

Try to access the web page at http://localhost:18080 and you should see a HTML response.

curl http://localhost:18080

Dont' forget to stop and remove the container:

podman container stop priceless_saha
podman container rm priceless_saha

Test buildah

Buildah works the same as docker build, you just need to use podman build instead and everything works the same.

Clone the repository

git clone

Build the image

buildah bud -t flask-app .

List all the image on local

buildah images
podman images

Run the image in a container

podman run -d -p 5000:5000 --events-backend=file flask-app

Check container status

podman ps

Try accessing applciation at http://localhost:5000/ 

Test skopeo

Use the following command to inspect an image properties on a remote repository:

skopeo inspect docker://

Use the following command to inspect an image configuration on a remote registry:

skopeo inspect --config docker:// | jq

If you don't have jq installed, you can download it from

You can also inspect your local images pulled by podman by using containers-storage transport.

skopeo inspect containers-storage:localhost/flask-app:latest

Copy an image from local registry to

skopeo copy --dest-creds=$user:$password containers-storage:localhost/flask-app:latest docker://