summaryrefslogtreecommitdiffstats
path: root/lcm/docker/build_image.sh
blob: cd08393257e5ffce48f62b2d09d6d090168021a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash

MYSQL_ROOT_PASSWORD="root"
PROXY_ARGS=""
ORG="onap"
VERSION="1.0.0-SNAPSHOT"
PROJECT="vfc"
IMAGE="vnflcm"
DOCKER_REPOSITORY="nexus3.onap.org:10003"

if [ $HTTP_PROXY ]; then
    PROXY_ARGS+="--build-arg HTTP_PROXY=${HTTP_PROXY}"
fi
if [ $HTTPS_PROXY ]; then
    PROXY_ARGS+=" --build-arg HTTPS_PROXY=${HTTPS_PROXY}"
fi

function build_vnflcm {
    docker build ${PROXY_ARGS} -t ${ORG}/${PROJECT}/${IMAGE}:${VERSION} -t ${ORG}/${PROJECT}/${IMAGE}:latest .
}

function push_vnflcm {
    docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}:${VERSION}
    docker push ${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}:latest
}

build_vnflcm
push_vnflcm
docker image list