summaryrefslogtreecommitdiffstats
path: root/fuel/build/docker/runcontext
diff options
context:
space:
mode:
Diffstat (limited to 'fuel/build/docker/runcontext')
-rwxr-xr-xfuel/build/docker/runcontext11
1 files changed, 10 insertions, 1 deletions
diff --git a/fuel/build/docker/runcontext b/fuel/build/docker/runcontext
index a22fb29..cf116fc 100755
--- a/fuel/build/docker/runcontext
+++ b/fuel/build/docker/runcontext
@@ -20,7 +20,16 @@ RUN /root/setcontext $USER $UID $GID $HOME
EOF`
GITROOT=`git rev-parse --show-toplevel`
CID=`echo $res | sed 's/.* //'`
-docker run --privileged=true --rm -i -e HOME=$HOME -u $USER -w $PWD -v ${HOME}/.ssh:${HOME}/.ssh -v $GITROOT:$GITROOT $CID "$@"
+
+ RUN_CONTEXT_OPT="--privileged=true --rm -i -e HOME=$HOME -u $USER -w $PWD -v ${HOME}/.ssh:${HOME}/.ssh -v $GITROOT:$GITROOT"
+
+if [ "${INTERACTIVE}" != "FALSE" ]; then
+ RUN_CONTEXT_OPT+=" -t"
+fi
+
+echo command: docker run ${RUN_CONTEXT_OPT} $CID "$@"
+docker run ${RUN_CONTEXT_OPT} $CID "$@"
+
rc=$?
docker rmi $CID > /dev/null
exit $rc