summaryrefslogtreecommitdiffstats
path: root/jjb/releng/opnfv-docker.sh
diff options
context:
space:
mode:
authorYujun Zhang <zhangyujun@gmail.com>2017-12-07 10:56:41 -0800
committerYujun Zhang <zhang.yujunz@zte.com.cn>2017-12-25 09:06:40 +0800
commitc019ec5a0f10b81673e0cf29da3df4e8404bf21e (patch)
tree4c88e38a08a9d76c277c5a8f8b52aa4ae2612db7 /jjb/releng/opnfv-docker.sh
parent6b5e80b0de5b166d7a790b219424c78b79221557 (diff)
Allow building docker image from specified path
Change-Id: Iab40fc2c719050d36a614fe529ca22634b59b7bc Signed-off-by: Yujun Zhang <zhangyujun@gmail.com>
Diffstat (limited to 'jjb/releng/opnfv-docker.sh')
-rw-r--r--jjb/releng/opnfv-docker.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/jjb/releng/opnfv-docker.sh b/jjb/releng/opnfv-docker.sh
index 9ba6e2bcc..7f646f1d9 100644
--- a/jjb/releng/opnfv-docker.sh
+++ b/jjb/releng/opnfv-docker.sh
@@ -61,7 +61,9 @@ done
# Remove the existing containers and images before building
remove_containers_images
-cd "$WORKSPACE/$DOCKER_DIR" || exit 1
+DOCKER_PATH=$WORKSPACE/$DOCKER_DIR
+
+cd $DOCKER_PATH || exit 1
HOST_ARCH="$(uname -m)"
#If there is a patch for other arch then x86, apply the patch and
#replace Dockerfile file
@@ -108,7 +110,7 @@ echo "--------------------------------------------------------"
echo
cmd="docker build --no-cache -t $DOCKER_REPO_NAME:$DOCKER_TAG --build-arg BRANCH=$BUILD_BRANCH
$ARCH_BUILD_ARG
- -f $DOCKERFILE ."
+ -f $DOCKERFILE $DOCKER_PATH"
echo ${cmd}
${cmd}