CentOS 8 の AppStream から dnf を使ってインストールすると podman v 1.6.4 が入るのですが、不具合があったので新しいバージョンを入れてみました。
Podman Installation Instructions
https://podman.io/getting-started/installation.html
上記サイトから CentOS 8 インストール用コマンドを引用します。
sudo dnf -y module disable container-tools
sudo dnf -y install 'dnf-command(copr)'
sudo dnf -y copr enable rhcontainerbot/container-selinux
sudo 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
sudo dnf -y install podman
これで新しいバージョンが入ります。
具体的に発生した不具合
ホストマシンをリブートした場合、IPアドレスの割り当てができないというエラーが出てコンテナが起動できませんでした。
Rebooted, dangling file in /var/lib/cni/networks/podman prevents container starting
https://github.com/containers/podman/issues/3759
ログとしては以下のように出ます。
Error adding network: failed to allocate for range 0: 10.88.0.80 has been allocated to [コンテナのID], duplicate allocation is not allowed
Error while adding pod to CNI network \"podman\": failed to allocate for range 0: 10.88.0.80 has been allocated to [コンテナのID], duplicate allocation is not allowed
再起動するたびにエラーが起きるので、 systemd に登録しても自動的に立ち上がらない問題に悩まされました。
最新にしても起こる事象
firewall-cmd --reload
すると、 podman が設定したファイアウォールのルールが消えてしまう問題もあるようです。コンテナを restart すると再度設定されます。こちらは 2.0.4 で発生しました。
CNI: Make firewalld rules –permanent
https://github.com/containers/podman/issues/5431