Podman Basic Notes

Playing around with Podman

1alias docker="sudo podman $1" 

The above command works as of this time and podman makes namespaces for every users for every resources, i.e., images, containers and so on.
It means, podman images and sudo podman images will show different resources.๐Ÿ˜Ž

1sudo podman pod create --name my-pod -p 8080:80
2sudo podman run -d --restart=always --pod=my-pod --name my-nginx nginx
3sudo podman run -d --restart=always --pod=my-pod --name my-curl curl
4sudo podman generate kube my-pod > my-pod.yaml
5sudo podman play kube ./my-pod.yaml

The generated file can not be used as raw. Below is an example of a manually edited version.

Install Podman on CentOS 8

1sudo dnf -y update
2sudo dnf -y module disable container-tools
3sudo dnf -y install 'dnf-command(copr)'
4sudo dnf -y copr enable rhcontainerbot/container-selinux
5sudo curl -L -o /etc/yum.repos.d/devel:kubic:libcontainers:stable.repo https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/CentOS_8/devel:kubic:libcontainers:stable.repo
6sudo dnf -y install podman

Happy containerizing! ๐Ÿ˜Ž

comments powered by Disqus