Docker: load kernelmodules: loop, binfmt_misc

This commit is contained in:
rpier1 2020-01-08 14:37:29 +01:00
parent bf656ca53c
commit 8451d87180

View File

@ -16,8 +16,25 @@ function install_binfmt_support {
fi fi
} }
function load_kernelmodule {
local kernelMod="$1"
if ! $SUDO modinfo $kernelMod &>/dev/null; then
echo "missing this kernel modul: $kernelMod"
exit 1
else
if $SUDO modprobe -n --first-time $kernelMod &>/dev/null; then
echo "loading kernel module $kernelMod"
$SUDO modprobe $kernelMod
fi
fi
}
install_binfmt_support install_binfmt_support
load_kernelmodule loop
load_kernelmodule binfmt_misc
DOCKER="$SUDO docker" DOCKER="$SUDO docker"
if ! ${DOCKER} ps >/dev/null; then if ! ${DOCKER} ps >/dev/null; then