From 0521e6c252aa0e019fe9e9753275d0d4468b8f5b Mon Sep 17 00:00:00 2001 From: Zack Cerza Date: Tue, 8 Jul 2025 10:29:42 -0600 Subject: [PATCH] Enable linger for the Jenkins user This fixes errors like: RunRoot is pointing to a path (/run/user/$ID/containers) which is not writable. Most likely podman will fail. Error: creating events dirs: mkdir /run/user/$ID: permission denied Signed-off-by: Zack Cerza --- scripts/setup_container_runtime.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/setup_container_runtime.sh b/scripts/setup_container_runtime.sh index 8235d705..375bcaad 100755 --- a/scripts/setup_container_runtime.sh +++ b/scripts/setup_container_runtime.sh @@ -25,6 +25,9 @@ function setup_container_runtime () { fi if command -v podman; then + if ! [ -d /run/user/$(id -u) -a -w /run/user/$(id -u) ]; then + sudo loginctl enable-linger $(id -nu) + fi PODMAN_MAJOR_VERSION=$(podman version -f json | jq -r '.Client.Version|split(".")[0]') if [ "$PODMAN_MAJOR_VERSION" -ge 4 ]; then PODMAN_DIR="$HOME/.local/share/containers" -- 2.39.5