Skip to content

Commit e83d501

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 <dakwon@redhat.com>
1 parent ba81a03 commit e83d501

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

devspaces-udi/Dockerfile

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

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

Lines changed: 3 additions & 0 deletions
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

Lines changed: 10 additions & 0 deletions
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)