cd08393257e5ffce48f62b2d09d6d090168021a5
[vfc/gvnfm/vnflcm.git] / lcm / docker / build_image.sh
1 #!/bin/bash
2
3 MYSQL_ROOT_PASSWORD="root"
4 PROXY_ARGS=""
5 ORG="onap"
6 VERSION="1.0.0-SNAPSHOT"
7 PROJECT="vfc"
8 IMAGE="vnflcm"
9 DOCKER_REPOSITORY="nexus3.onap.org:10003"
10
11 if [ $HTTP_PROXY ]; then
12     PROXY_ARGS+="--build-arg HTTP_PROXY=${HTTP_PROXY}"
13 fi
14 if [ $HTTPS_PROXY ]; then
15     PROXY_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
16 fi
17
18 function build_vnflcm {
19     docker build ${PROXY_ARGS} -t ${ORG}/${PROJECT}/${IMAGE}:${VERSION} -t ${ORG}/${PROJECT}/${IMAGE}:latest .
20 }
21
22 function push_vnflcm {
23     docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}:${VERSION}
24     docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}:latest
25 }
26
27 build_vnflcm
28 push_vnflcm
29 docker image list