From 02f0e3c4da5604feaa463c983ab84c7824f6b3fd Mon Sep 17 00:00:00 2001 From: dschroeder Date: Mon, 24 Jul 2017 20:03:17 +0000 Subject: [PATCH] #2 implements SILO_DOCKER_CMD to enable user to override the docker command --- silo/runner | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/silo/runner b/silo/runner index 7d574ce..c9ac328 100644 --- a/silo/runner +++ b/silo/runner @@ -57,6 +57,7 @@ fi # Globals: # SILO_DEBUG # BUNDLE_VERSION +# SILO_DOCKER_CMD # SILO_IMAGE # SILO_IMAGE_SHORT # SILO_VERSION @@ -66,9 +67,13 @@ fi # None ####################################### run() { - local command func + local command docker_cmd docker_default func - command="$(command -v docker) run --interactive --tty --rm" + # SILO_DOCKER_CMD can be set by the user to override the default docker + # command + docker_default="$(command -v docker)" + docker_cmd="${SILO_DOCKER_CMD:-${docker_default}}" + command="${docker_cmd} run --interactive --tty --rm" # SILO_IMAGE_SHORT is defined in silo/runner_functions.sh and contains the # basename of the Docker image. Below test checks if this is the ansible-silo