summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryangyan <yangyanyj@chinamobile.com>2019-05-10 18:03:53 +0800
committeryangyan <yangyanyj@chinamobile.com>2019-05-10 18:04:06 +0800
commit75fa91342abe1056a802c5a8272670ded30618d9 (patch)
treece815a6089b75172b3c27a22eec04c55a156f047
parentd6dd15bbcf04877127f867176fa501f7662f7159 (diff)
Add ARG and PKG_VERSION to Dockerfile
Change-Id: I7ca5edf7c78039660732a3a3807d84e2d33beceb Issue-ID: VFC-1383 Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rwxr-xr-xlcm/docker/Dockerfile3
-rwxr-xr-xlcm/docker/build_image.sh2
-rwxr-xr-xlcm/docker/docker-env-conf.sh4
3 files changed, 7 insertions, 2 deletions
diff --git a/lcm/docker/Dockerfile b/lcm/docker/Dockerfile
index cb866d8d..ad49eeff 100755
--- a/lcm/docker/Dockerfile
+++ b/lcm/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/lcm/docker/build_image.sh b/lcm/docker/build_image.sh
index 2abde53d..a524b9ee 100755
--- a/lcm/docker/build_image.sh
+++ b/lcm/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/lcm/docker/docker-env-conf.sh b/lcm/docker/docker-env-conf.sh
index 80fa123e..d11c6721 100755
--- a/lcm/docker/docker-env-conf.sh
+++ b/lcm/docker/docker-env-conf.sh
@@ -7,8 +7,8 @@ install_sf(){
apk --no-cache add python-dev libffi-dev musl-dev py2-virtualenv
# get binary zip from nexus - vfc-nfvo-catalog
- wget -q -O vfc-gvnfm-vnflcm-lcm.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.gvnfm.vnflcm.lcm&a=vfc-gvnfm-vnflcm-lcm&v=LATEST&e=zip'
- unzip vfc-gvnfm-vnflcm-lcm.zip
+ wget -q -O vfc-gvnfm-vnflcm-lcm.zip 'https://nexus.onap.org/service/local/artifact/maven/redirect?r=snapshots&g=org.onap.vfc.gvnfm.vnflcm.lcm&a=vfc-gvnfm-vnflcm-lcm&v=${pkg_verison}-SNAPSHOT&e=zip' && \
+ unzip vfc-gvnfm-vnflcm-lcm.zip && \
rm -rf vfc-gvnfm-vnflcm-lcm.zip
wait
pip install --upgrade setuptools pip