Skip to content

Commit f225913

Browse files
cgruveribuziuk
authored andcommitted
add logic to detect fuse-overlayfs support
Signed-off-by: cgruver <[email protected]>
1 parent 5c12042 commit f225913

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

base/ubi9/entrypoint.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ if [ ! -d "${HOME}" ]; then
55
mkdir -p "${HOME}"
66
fi
77

8-
# Configure container builds to use vfs
8+
# Configure container builds to use vfs or fuse-overlayfs
99
if [ ! -d "${HOME}/.config/containers" ]
1010
then
1111
mkdir -p ${HOME}/.config/containers
12-
(echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf
12+
if [ -c "/dev/fuse" ] && [ -f "/usr/bin/fuse-overlayfs" ]
13+
then
14+
(echo '[storage]';echo 'driver = "overlay"';echo '[storage.options.overlay]';echo 'mount_program = "/usr/bin/fuse-overlayfs"') > ${HOME}/.config/containers/storage.conf
15+
else
16+
(echo '[storage]';echo 'driver = "vfs"') > "${HOME}"/.config/containers/storage.conf
17+
fi
1318
fi
1419

1520
# Setup $PS1 for a consistent and reasonable prompt

0 commit comments

Comments
 (0)