Skip to content

Commit 71cf829

Browse files
committed
create: explicitly prefer using crun if present
Signed-off-by: Luca Di Maio <[email protected]>
1 parent f0fcc3b commit 71cf829

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

distrobox-create

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -920,6 +920,12 @@ generate_create_command()
920920
# These flags are not supported by docker, so we use them only if our
921921
# container manager is podman.
922922
if echo "${container_manager}" | grep -q "podman"; then
923+
# If possible, always prefer crun, as it allows keeping original groups.
924+
# useful for rootless containers.
925+
if command -v crun > /dev/null 2>&1; then
926+
result_command="${result_command}
927+
--runtime=crun"
928+
fi
923929
result_command="${result_command}
924930
--annotation run.oci.keep_original_groups=1
925931
--ulimit host"

0 commit comments

Comments
 (0)