diff options
author | yangyan <yangyanyj@chinamobile.com> | 2019-05-10 18:16:21 +0800 |
---|---|---|
committer | yangyan <yangyanyj@chinamobile.com> | 2019-05-10 18:16:31 +0800 |
commit | 3fe1223629b7d58f825b7c5366ebb929eb962f30 (patch) | |
tree | ebfb2babd600707145ea258a6b447ca054e79f54 /docker | |
parent | 193370c98a2908c1e1c045db8b2b95453334b1eb (diff) |
Add ARG and PKG_VERSION to Dockerfile
Change-Id: I99747948a8e1b1f8d6912976bd9c491a92b72714
Issue-ID: VFC-1383
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Diffstat (limited to 'docker')
-rwxr-xr-x | docker/Dockerfile | 3 | ||||
-rwxr-xr-x | docker/build_image.sh | 2 | ||||
-rwxr-xr-x | docker/docker-env-conf.sh | 2 |
3 files changed, 6 insertions, 1 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile index 68570116..90bcceef 100755 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -2,8 +2,11 @@ FROM python:2-alpine ARG HTTP_PROXY=${HTTP_PROXY} ARG HTTPS_PROXY=${HTTPS_PROXY} +ARG PKG_VERSION ENV http_proxy $HTTP_PROXY ENV https_proxy $HTTPS_PROXY +ENV pkg_verison=${PKG_VERSION} + ADD . /service WORKDIR /service diff --git a/docker/build_image.sh b/docker/build_image.sh index 7891b16b..1cb06833 100755 --- a/docker/build_image.sh +++ b/docker/build_image.sh @@ -13,6 +13,8 @@ DOCKER_REPOSITORY="nexus3.onap.org:10003" IMAGE_NAME="${DOCKER_REPOSITORY}/${ORG}/${PROJECT}/${IMAGE}" TIMESTAMP=$(date +"%Y%m%dT%H%M%S") +BUILD_ARGS+=" --build-arg PKG_VERSION=${VERSION}" + if [ $HTTP_PROXY ]; then BUILD_ARGS+=" --build-arg HTTP_PROXY=${HTTP_PROXY}" fi diff --git a/docker/docker-env-conf.sh b/docker/docker-env-conf.sh index b523562c..96754def 100755 --- a/docker/docker-env-conf.sh +++ b/docker/docker-env-conf.sh @@ -8,7 +8,7 @@ install_sf(){ # get binary zip from nexus - vfc-nfvo-catalog - wget -q -O vfc-nfvo-catalog.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.catalog&a=vfc-nfvo-catalog&v=LATEST&e=zip' && \ + wget -q -O vfc-nfvo-catalog.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.nfvo.catalog&a=vfc-nfvo-catalog&v=${pkg_verison}-SNAPSHOT&e=zip' && \ unzip vfc-nfvo-catalog.zip && \ rm -rf vfc-nfvo-catalog.zip && \ pip install --upgrade setuptools pip && \ |