diff options
author | fujinhua <fu.jinhua@zte.com.cn> | 2017-09-04 10:02:02 +0800 |
---|---|---|
committer | fujinhua <fu.jinhua@zte.com.cn> | 2017-09-04 10:02:02 +0800 |
commit | 95d2e7e8bfa48fffe85ad7a66063e7011612a339 (patch) | |
tree | cc44fd4d93f5a2ba1d76096af82a9ad8db59b6fa /docker | |
parent | 6260dad1f2ca6be7b620543c936166011f558ad6 (diff) |
Fix image name of docker build
Change-Id: Iab55a09d4bb01e29a27861375bd066102e9a2b67
Issue-Id: VFC-245
Signed-off-by: fujinhua <fu.jinhua@zte.com.cn>
Diffstat (limited to 'docker')
-rwxr-xr-x | docker/build_image.sh | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/docker/build_image.sh b/docker/build_image.sh index 9fc4879b..9d2c97a8 100755 --- a/docker/build_image.sh +++ b/docker/build_image.sh @@ -1,29 +1,28 @@ #!/bin/bash -MYSQL_ROOT_PASSWORD="root" -PROXY_ARGS="" +BUILD_ARGS="--no-cache" ORG="onap" VERSION="1.0.0-SNAPSHOT" PROJECT="vfc" IMAGE="nslcm" DOCKER_REPOSITORY="nexus3.onap.org:10003" +IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" if [ $HTTP_PROXY ]; then - PROXY_ARGS+="--build-arg HTTP_PROXY=${HTTP_PROXY}" + BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}" fi if [ $HTTPS_PROXY ]; then - PROXY_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}" + BUILD_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}" fi function build_lcm { - docker build ${PROXY_ARGS} -t ${ORG}/${PROJECT}/${IMAGE}:${VERSION} -t ${ORG}/${PROJECT}/${IMAGE}:latest . + docker build ${BUILD_ARGS} -t ${IMAGE_NAME}:${VERSION} -t ${IMAGE_NAME}:latest . } function push_lcm { - docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}:${VERSION} - docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}:latest + docker push ${IMAGE_NAME}:${VERSION} + docker push ${IMAGE_NAME}:latest } build_lcm push_lcm -docker image list |