From cead930ece4a5b593009630627ddc47c16454a66 Mon Sep 17 00:00:00 2001 From: "Stefan K. Berg" Date: Thu, 5 Nov 2015 14:17:54 +0100 Subject: 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 (cherry picked from commit bae859e2a47befeb3c6a97988dc778daf66e37bd) --- fuel/build/docker/runcontext | 50 ++++++++++++++++++++++++++++++++------------ 1 file changed, 37 insertions(+), 13 deletions(-) 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 <