From bed3f85213c773d0e0aff895ab072a0ea8b8c38c Mon Sep 17 00:00:00 2001 From: JohnTheCoolingFan Date: Thu, 15 Aug 2024 12:27:26 +0300 Subject: [PATCH] Run docker via run_host_command_logged --- lib/functions/host/docker.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/functions/host/docker.sh b/lib/functions/host/docker.sh index d2a113f64b..1abdd532ea 100644 --- a/lib/functions/host/docker.sh +++ b/lib/functions/host/docker.sh @@ -574,9 +574,10 @@ function docker_cli_launch() { # This check is performed in order to set up the host so that it has a loop device, as calling losetup inside of # docker creates a loop device but does not make it available to the already running container + # The amount of privileges and capabilities given is a bare minimum needed for losetup to work if [[ ! -e /dev/loop0 ]]; then display_alert "Running losetup in a temporary container" "because no loop devices exist" "info" - docker run "${DOCKER_ARGS[@]}" "${DOCKER_ARMBIAN_INITIAL_IMAGE_TAG}" /usr/sbin/losetup -f + run_host_command_logged docker run --rm --privileged --cap-add=MKNOD "${DOCKER_ARMBIAN_INITIAL_IMAGE_TAG}" /usr/sbin/losetup -f fi display_alert "-----------------Relaunching in Docker after ${SECONDS}s------------------" "here comes the 🐳" "info"