From c407421a268785b5d0ade7cdd31895a5c4e61708 Mon Sep 17 00:00:00 2001 From: Julio Montes Date: Mon, 20 Jan 2020 20:38:53 +0000 Subject: [PATCH] image-builder: make docker runtime configurable Add DOCKER_RUNTIME variable to change container runtime depending on the CI/environment. fixes #397 Signed-off-by: Julio Montes --- image-builder/image_builder.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/image-builder/image_builder.sh b/image-builder/image_builder.sh index eaa8367adb..06cc71172f 100755 --- a/image-builder/image_builder.sh +++ b/image-builder/image_builder.sh @@ -8,6 +8,8 @@ set -e [ -n "${DEBUG}" ] && set -x +DOCKER_RUNTIME=${DOCKER_RUNTIME:-runc} + readonly script_name="${0##*/}" readonly script_dir=$(dirname "$(readlink -f "$0")") readonly lib_file="${script_dir}/../scripts/lib.sh" @@ -149,7 +151,7 @@ build_with_container() { #https://github.com/clearcontainers/runtime/issues/828 "${container_engine}" run \ --rm \ - --runtime runc \ + --runtime "${DOCKER_RUNTIME}" \ --privileged \ --env AGENT_BIN="${agent_bin}" \ --env AGENT_INIT="${agent_init}" \