diff options
Diffstat (limited to 'scripts/command/docker-run')
-rw-r--r-- | scripts/command/docker-run | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/command/docker-run b/scripts/command/docker-run new file mode 100644 index 000000000..386c68145 --- /dev/null +++ b/scripts/command/docker-run @@ -0,0 +1,26 @@ +#!/bin/bash + +SCRIPT_ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +source $SCRIPT_ROOT/common.sh + +HOST_HOME=$SCRIPT_ROOT/../.. +DOCKER_HOME=/home + +GIT_SSL_NO_VERIFY=1 + +DOCKER_VOLUMES+=" -v $HOST_HOME:$DOCKER_HOME" + +DOCKER_ENV_VARS+=" -e http_proxy" +DOCKER_ENV_VARS+=" -e no_proxy" +DOCKER_ENV_VARS+=" -e GIT_SSL_NO_VERIFY" + +DOCKER_RUN_OPTS="--rm" +DOCKER_RUN_OPTS+=" -w $DOCKER_HOME" + +docker run $DOCKER_RUN_OPTS $DOCKER_ENV_VARS $DOCKER_VOLUMES $DOCKER_IMAGE_NAME "$@" +EXITCODE=$? + +docker_cleanup + +exit $EXITCODE |