From 6334880015a065f7401d263acc5ea7bb898397a9 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Fri, 4 Dec 2026 13:01:53 +0100 Subject: [PATCH 1/2] fix: generate valid TOML in storage.conf 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"]. Verified in a DevWorkspace against the ubi10 image: with a valid vfs user storage.conf, podman info succeeds. Co-Authored-By: Claude Code Signed-off-by: Anatolii Bazko --- base/ubi10/Dockerfile | 2 +- base/ubi9/Dockerfile | 2 +- 2 files changed, 2 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/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 From 666fcd6d78a52298b101e8d0054e9556dbcfa550 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Fri, 4 Dec 2026 13:31:50 +0100 Subject: [PATCH 2/2] fix: point podman at the user storage.conf via CONTAINERS_STORAGE_CONF podman >= 5 does not pick up ~/.config/containers/storage.conf on its own (verified with podman 5.8.2 and 6.1.4): on a clean state it auto-detects the overlay driver and fails inside DevWorkspaces ("failed to mount overlay for metacopy check: permission denied"), even though entrypoint.sh has written a valid vfs storage.conf. Setting CONTAINERS_STORAGE_CONF makes podman read the file the entrypoint generates (vfs, or overlay with fuse-overlayfs when /dev/fuse is available), so `podman info` works out of the box in freshly created workspaces. Co-Authored-By: Claude Code Signed-off-by: Anatolii Bazko --- base/ubi10/Dockerfile | 3 +++ base/ubi9/Dockerfile | 3 +++ 2 files changed, 6 insertions(+) diff --git a/base/ubi10/Dockerfile b/base/ubi10/Dockerfile index 04a76d2f..b6224386 100644 --- a/base/ubi10/Dockerfile +++ b/base/ubi10/Dockerfile @@ -247,6 +247,9 @@ RUN set -e; \ rm -f /tmp/kubedock.tar.gz COPY --chown=0:0 kubedock_setup.sh /usr/local/bin/kubedock_setup +# podman >= 5 ignores ~/.config/containers/storage.conf unless explicitly pointed at +ENV CONTAINERS_STORAGE_CONF=/home/user/.config/containers/storage.conf + # Configure Podman wrapper ENV PODMAN_WRAPPER_PATH=/usr/bin/podman.wrapper ENV ORIGINAL_PODMAN_PATH=/usr/bin/podman.orig diff --git a/base/ubi9/Dockerfile b/base/ubi9/Dockerfile index a8b9d65e..a51f6dbf 100644 --- a/base/ubi9/Dockerfile +++ b/base/ubi9/Dockerfile @@ -225,6 +225,9 @@ RUN set -e; \ rm -f /tmp/kubedock.tar.gz COPY --chown=0:0 kubedock_setup.sh /usr/local/bin/kubedock_setup +# podman >= 5 ignores ~/.config/containers/storage.conf unless explicitly pointed at +ENV CONTAINERS_STORAGE_CONF=/home/user/.config/containers/storage.conf + # Configure Podman wrapper ENV PODMAN_WRAPPER_PATH=/usr/bin/podman.wrapper ENV ORIGINAL_PODMAN_PATH=/usr/bin/podman.orig