summaryrefslogtreecommitdiffstats
path: root/docker/build_image.sh
diff options
context:
space:
mode:
authorfujinhua <fu.jinhua@zte.com.cn>2017-09-01 11:22:35 +0800
committerfujinhua <fu.jinhua@zte.com.cn>2017-09-01 11:22:35 +0800
commitf9a1431adc1432921813263a8595eac577a09f17 (patch)
tree4430ca5db7d5ea7fddd738195be67bd15a91ae4b /docker/build_image.sh
parentd25d9fb96d25c4b5be08f5affd07db22516bfb2b (diff)
Update docker scripts
Add db initialize script Add docker push script Modify docker image name Change-Id: Ifd12dc86c70d4f17d381831a1fadeb51bdf17f49 Issue-Id: VFC-215 Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'docker/build_image.sh')
-rwxr-xr-xdocker/build_image.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/docker/build_image.sh b/docker/build_image.sh
index 3c625248..508f0b41 100755
--- a/docker/build_image.sh
+++ b/docker/build_image.sh
@@ -2,6 +2,11 @@
MYSQL_ROOT_PASSWORD="root"
PROXY_ARGS=""
+ORG="onap"
+VERSION="1.0.0-SNAPSHOT"
+PROJECT="vfc"
+IMAGE="nslcm"
+DOCKER_REPOSITORY="nexus3.onap.org:10003"
if [ $HTTP_PROXY ]; then
PROXY_ARGS+="--build-arg HTTP_PROXY=${HTTP_PROXY}"
@@ -11,9 +16,14 @@ if [ $HTTPS_PROXY ]; then
fi
function build_lcm {
- cd ../
- docker build ${PROXY_ARGS} --build-arg MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} -f docker/Dockerfile -t vfc-nfvo-lcm .
+ docker build ${PROXY_ARGS} --build-arg MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} -t ${ORG}/${PROJECT}/${IMAGE}:${VERSION} -t ${ORG}/${PROJECT}/${IMAGE}:latest .
+}
+
+function push_lcm {
+ docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}:${VERSION}
+ docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}:latest
}
build_lcm
+push_lcm
docker image list