From c72c95496e8dbb28405596f9c927b4a96d35abb6 Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Thu, 28 Mar 2019 13:59:15 +0000 Subject: [PATCH] rootfs-builder: add rootfs.sh DOCKER_RUNTIME env var On some systems the "runc" runtime isn't available or has a different name. Allow the user to override the Docker runtime. Signed-off-by: Stefan Hajnoczi Fixes: #268 --- rootfs-builder/rootfs.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rootfs-builder/rootfs.sh b/rootfs-builder/rootfs.sh index fe49302d2..fdce3846f 100755 --- a/rootfs-builder/rootfs.sh +++ b/rootfs-builder/rootfs.sh @@ -16,6 +16,7 @@ AGENT_BIN=${AGENT_BIN:-kata-agent} AGENT_INIT=${AGENT_INIT:-no} KERNEL_MODULES_DIR=${KERNEL_MODULES_DIR:-""} OSBUILDER_VERSION="unknown" +DOCKER_RUNTIME=${DOCKER_RUNTIME:-runc} export GOPATH=${GOPATH:-${HOME}/go} lib_file="${script_dir}/../scripts/lib.sh" @@ -103,6 +104,9 @@ USE_DOCKER If set, build the rootfs inside a container (requires Docker). Default value: +DOCKER_RUNTIME Docker runtime to use when USE_DOCKER is set. + Default value: runc + Refer to the Platform-OS Compatibility Matrix for more details on the supported architectures: https://github.com/kata-containers/osbuilder#platform-distro-compatibility-matrix @@ -319,7 +323,7 @@ if [ -n "${USE_DOCKER}" ] ; then docker_run_args="" docker_run_args+=" --rm" - docker_run_args+=" --runtime runc" + docker_run_args+=" --runtime ${DOCKER_RUNTIME}" if [ -z "${AGENT_SOURCE_BIN}" ] ; then docker_run_args+=" --env GO_AGENT_PKG=${GO_AGENT_PKG}"