From 751cd3bab303c700588f8e2714e09efdb7bdbf89 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Fri, 4 Dec 2026 12:56:32 +0100 Subject: [PATCH 1/2] fix: generate valid TOML in storage.conf and reset stale podman state The sed that adjusted /usr/share/containers/storage.conf appended a bare "/var/lib/shared", line after the commented additionalimagestores entry, producing invalid TOML. Podman >= 5 warns "Failed to obtain podman configuration" and silently falls back to default settings (overlay driver), which fails inside DevWorkspaces without /dev/fuse or unprivileged overlay mounts ("failed to mount overlay for metacopy check: permission denied"). Replace the append with a proper substitution that uncomments and sets additionalimagestores = ["/var/lib/shared"]. Also clear ~/.local/share/containers/storage on first start in entrypoint.sh: podman >= 5 persists the graph driver in its sqlite database, which takes precedence over storage.conf, so a previously failed run (seeded with the overlay driver) keeps failing even after a correct vfs/fuse-overlayfs storage.conf is written. Verified in a DevWorkspace against the ubi10 image: with the vfs user storage.conf and cleared state, `podman info` succeeds. Co-Authored-By: Claude Code Signed-off-by: Anatolii Bazko --- base/ubi10/Dockerfile | 2 +- base/ubi10/entrypoint.sh | 3 +++ base/ubi9/Dockerfile | 2 +- base/ubi9/entrypoint.sh | 3 +++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/base/ubi10/Dockerfile b/base/ubi10/Dockerfile index 827ce782..04a76d2f 100644 --- a/base/ubi10/Dockerfile +++ b/base/ubi10/Dockerfile @@ -207,7 +207,7 @@ RUN touch /etc/subgid /etc/subuid && \ echo user:10000:65536 > /etc/subgid # Adjust storage.conf to enable Fuse storage. -RUN sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' /usr/share/containers/storage.conf +RUN sed -i -e 's|^#mount_program|mount_program|g' -e 's|^# *additionalimagestores *= .*|additionalimagestores = ["/var/lib/shared"]|' /usr/share/containers/storage.conf RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers; \ touch /var/lib/shared/overlay-images/images.lock; \ touch /var/lib/shared/overlay-layers/layers.lock diff --git a/base/ubi10/entrypoint.sh b/base/ubi10/entrypoint.sh index c58f7226..05fff098 100644 --- a/base/ubi10/entrypoint.sh +++ b/base/ubi10/entrypoint.sh @@ -59,6 +59,9 @@ if [ ! -d "${HOME}/.config/containers" ]; then else (echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf fi + # A previously failed run may have seeded the podman sqlite database with a + # different graph driver, which takes precedence over storage.conf (podman >= 5). + rm -rf "${HOME}/.local/share/containers/storage" fi # Setup $PS1 for a consistent and reasonable prompt diff --git a/base/ubi9/Dockerfile b/base/ubi9/Dockerfile index 077c35b5..a8b9d65e 100644 --- a/base/ubi9/Dockerfile +++ b/base/ubi9/Dockerfile @@ -186,7 +186,7 @@ RUN touch /etc/subgid /etc/subuid && \ echo user:10000:65536 > /etc/subgid # Adjust storage.conf to enable Fuse storage. -RUN sed -i -e 's|^#mount_program|mount_program|g' -e '/additionalimage.*/a "/var/lib/shared",' /etc/containers/storage.conf +RUN sed -i -e 's|^#mount_program|mount_program|g' -e 's|^# *additionalimagestores *= .*|additionalimagestores = ["/var/lib/shared"]|' /etc/containers/storage.conf RUN mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers; \ touch /var/lib/shared/overlay-images/images.lock; \ touch /var/lib/shared/overlay-layers/layers.lock diff --git a/base/ubi9/entrypoint.sh b/base/ubi9/entrypoint.sh index 8dc55500..d776c7b3 100644 --- a/base/ubi9/entrypoint.sh +++ b/base/ubi9/entrypoint.sh @@ -58,6 +58,9 @@ if [ ! -d "${HOME}/.config/containers" ]; then else (echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf fi + # A previously failed run may have seeded the podman sqlite database with a + # different graph driver, which takes precedence over storage.conf (podman >= 5). + rm -rf "${HOME}/.local/share/containers/storage" fi # Setup $PS1 for a consistent and reasonable prompt From f5a71b8368aaee0ff7a02e134411a48bbf0afea4 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Fri, 4 Dec 2026 12:57:52 +0100 Subject: [PATCH 2/2] revert: drop entrypoint.sh stale podman state cleanup Co-Authored-By: Claude Code Signed-off-by: Anatolii Bazko --- base/ubi10/entrypoint.sh | 3 --- base/ubi9/entrypoint.sh | 3 --- 2 files changed, 6 deletions(-) diff --git a/base/ubi10/entrypoint.sh b/base/ubi10/entrypoint.sh index 05fff098..c58f7226 100644 --- a/base/ubi10/entrypoint.sh +++ b/base/ubi10/entrypoint.sh @@ -59,9 +59,6 @@ if [ ! -d "${HOME}/.config/containers" ]; then else (echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf fi - # A previously failed run may have seeded the podman sqlite database with a - # different graph driver, which takes precedence over storage.conf (podman >= 5). - rm -rf "${HOME}/.local/share/containers/storage" fi # Setup $PS1 for a consistent and reasonable prompt diff --git a/base/ubi9/entrypoint.sh b/base/ubi9/entrypoint.sh index d776c7b3..8dc55500 100644 --- a/base/ubi9/entrypoint.sh +++ b/base/ubi9/entrypoint.sh @@ -58,9 +58,6 @@ if [ ! -d "${HOME}/.config/containers" ]; then else (echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf fi - # A previously failed run may have seeded the podman sqlite database with a - # different graph driver, which takes precedence over storage.conf (podman >= 5). - rm -rf "${HOME}/.local/share/containers/storage" fi # Setup $PS1 for a consistent and reasonable prompt