summaryrefslogtreecommitdiffstats
path: root/mgr/docker/build_image.sh
diff options
context:
space:
mode:
authorShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2017-09-05 15:52:48 -0700
committerShashank Kumar Shankar <shashank.kumar.shankar@intel.com>2017-09-06 15:43:58 -0700
commitd816d444383c73862535c89483c01e0d125a722c (patch)
tree29217fce57467df58742a792b5d66cb17629fbb6 /mgr/docker/build_image.sh
parentdff6a11d425677eec5909d2cdab9cc1c277719c7 (diff)
Add GVNFM VNFMGR Docker image and build scripts
This patch adds the scripts and Dockerfile for building GVNFM/VNFGR docker image. Change-Id: I4642228523691095ff77cd5fa0007d853e93b7d5 Issue-Id: VFC-282 Signed-off-by: Shashank Kumar Shankar <shashank.kumar.shankar@intel.com>
Diffstat (limited to 'mgr/docker/build_image.sh')
-rwxr-xr-xmgr/docker/build_image.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/mgr/docker/build_image.sh b/mgr/docker/build_image.sh
new file mode 100755
index 0000000..a86517b
--- /dev/null
+++ b/mgr/docker/build_image.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+DIRNAME=`dirname $0`
+DOCKER_BUILD_DIR=`cd $DIRNAME/; pwd`
+echo "DOCKER_BUILD_DIR=${DOCKER_BUILD_DIR}"
+cd ${DOCKER_BUILD_DIR}
+
+BUILD_ARGS="--no-cache"
+ORG="onap"
+VERSION="1.0.0-SNAPSHOT"
+PROJECT="vfc"
+IMAGE="vnfmgr"
+DOCKER_REPOSITORY="nexus3.onap.org:10003"
+IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}"
+
+if [ $HTTP_PROXY ]; then
+ BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}"
+fi
+if [ $HTTPS_PROXY ]; then
+ BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
+fi
+
+function build_image {
+ echo "Start build docker image: ${IMAGE_NAME}"
+ docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION} -t ${IMAGE_NAME}:latest .
+}
+
+function push_image {
+ echo "Start push docker image: ${IMAGE_NAME}"
+ docker push ${IMAGE_NAME}:${VERSION}
+ docker push ${IMAGE_NAME}:latest
+}
+
+build_image
+push_image \ No newline at end of file