From: Stefan K. Berg Date: Thu, 5 Nov 2015 13:17:54 +0000 (+0100) Subject: Removed bind mount of .ssh in runcontext X-Git-Tag: brahmaputra.1.rc1~127^2 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F59%2F3059%2F2;p=fuel.git Removed bind mount of .ssh in runcontext Previously the .ssh directory of the invoking user was bind mounted into the build container. This behavior is now removed. The ssh keys in the user's .ssh is however *copied* into the container if, and only if, the RSYNC_CONNECT_PROG environment variable has been set as this indicates the need to tunnel rsync traffic over (presumably) ssh. In this case the keys may actually be needed. In both cases the .ssh/config file will be updated with the StrictHostKeyChecking=no option to prevent failure due to the ssh confirmation dialogue. Change-Id: Ic2ecc9d7a9abfa796bdfa6aaa8cde0dcb632d76e Signed-off-by: Stefan K. Berg --- diff --git a/fuel/build/docker/runcontext b/fuel/build/docker/runcontext index a874fb8e9..f9065a01f 100755 --- a/fuel/build/docker/runcontext +++ b/fuel/build/docker/runcontext @@ -16,8 +16,9 @@ set -e # do_exit () { - CID=`cat $CID_FILE` + CID=`cat $CID_FILE /dev/null 2>&1 docker rm -f $CID > /dev/null 2>&1 @@ -29,24 +30,47 @@ do_exit () { # End of Exit handlers ############################################################################ - trap do_exit SIGINT SIGTERM EXIT context=$1 shift -GID=`id -g` +USER_ID=`id -u` USER=`whoami` -res=`docker build -q --force-rm - <> $CONTEXT_DIR/.ssh/config < $CONTEXT_DIR/Dockerfile <