Skip to content

Commit 9065ee6

Browse files
committed
Update UDI to automatically detect fuse and for podman 5 support
Fixes are from devfile/developer-images/pull/198 and devfile/developer-images/pull/209 Signed-off-by: David Kwon <[email protected]>
1 parent 87af783 commit 9065ee6

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

devspaces-udi/Dockerfile

+1-5
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,7 @@ RUN \
220220
mkdir -p /var/lib/shared/overlay-images /var/lib/shared/overlay-layers; \
221221
touch /var/lib/shared/overlay-images/images.lock; \
222222
touch /var/lib/shared/overlay-layers/layers.lock && \
223-
## Rootless podman install #5: but use VFS since we were not able to make Fuse work yet...
224-
# TODO switch this to fuse in OCP 4.12?
225-
mkdir -p "${HOME}"/.config/containers && \
226-
(echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf && \
227-
## Rootless podman install #6: rename podman to allow the execution of 'podman run' using
223+
## Rootless podman install #5: rename podman to allow the execution of 'podman run' using
228224
## kubedock but 'podman build' using podman.orig
229225
mv /usr/bin/podman /usr/bin/podman.orig && \
230226
# Docker alias

devspaces-udi/etc/.stow-local-ignore

+3
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@
55
# but we don't want them to be symbolic links (or to cause stow conflicts). They will be copied to /home/user/ manually.
66
\.bashrc
77
\.bash_profile
8+
9+
# Ignore files under .config directory
10+
\.config

devspaces-udi/etc/entrypoint.sh

+10
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@ else
118118
ln -f -s /usr/bin/podman.orig /home/tooling/.local/bin/podman
119119
fi
120120

121+
# Configure container builds to use vfs or fuse-overlayfs
122+
if [ ! -d "${HOME}/.config/containers" ]; then
123+
mkdir -p ${HOME}/.config/containers
124+
if [ -c "/dev/fuse" ] && [ -f "/usr/bin/fuse-overlayfs" ]; then
125+
(echo '[storage]';echo 'driver = "overlay"';echo '[storage.options.overlay]';echo 'mount_program = "/usr/bin/fuse-overlayfs"') > ${HOME}/.config/containers/storage.conf
126+
else
127+
(echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf
128+
fi
129+
fi
130+
121131
#############################################################################
122132
# Stow: If persistUserHome is enabled, then the contents of /home/user/
123133
# will be mounted by a PVC and overwritten. In this case, we use stow to

0 commit comments

Comments
 (0)