#author("2021-03-11T18:49:08+09:00","default:nobuoki","nobuoki") #author("2021-03-11T18:50:08+09:00","default:nobuoki","nobuoki") * はじめに [#h14f85f1] そろそろmsys2なりVMからwsl2に移行しても良いかなとおもってPodmanも試してみました - 2020/11/12 リンク修正 - 2021/03/11 containers.conf 変更手順を修正 * 手順 [#aebf396d] 概ね [[How to run Podman on Windows with WSL2 | Enable Sysadmin>https://www.redhat.com/sysadmin/podman-windows-wsl2]] のとおりで良いのですが、最新版のPodmanの仕様に合わせて最後の手順を変えます #pre{{{ Rootless configuration file changes If you plan to run podman as a non-root user, you should start with a simple podman command like: $ podman info This action will create the Podman configuration file $HOME/.config/containers/libpod.conf. Simply edit this file and change the value of events_logger to <file>. }}} ここで言いたい内容は man podman すると分かるのですが、つまりはこういうことです。 - /usr/share/containers/containers.conf を雛形にして $HOME/.config/containers/containers.conf を作成する - $HOME/.config/containers/containers.conf で events_logger = "file" を設定する そこで以下のように手順を変えます #prism{{{ conf_src="/usr/share/containers/containers.conf" conf_user="$HOME/.config/containers/containers.conf" mkdir -p "${conf_user%/*}" sed '/events_logger/{s/^# //; s/journald/file/}' "$conf_src" >"$conf_user" }}} これにより「pod event が journal に書けないぜ」的なエラーが無くなります #pre{{{ # こういう奴が消える ERRO[0000] unable to write pod event: "write unixgram @0001c->/run/systemd/journal/socket: sendmsg: no such file or directory" }}} もちろん podman --events-backend=file でも消えます こちらが良い人は alias podman='podman --events-backend=file' しておくのが良いかもしれませんね