diff options
author | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-06-28 09:51:33 +0800 |
---|---|---|
committer | hongyuzhao <zhao.hongyu@zte.com.cn> | 2019-07-03 11:19:09 +0800 |
commit | 46ad7c172411214c5432ed93fda4271288077447 (patch) | |
tree | 74adb32f9cdfe575184e67068faac9bc6c2117b7 /lcm/docker | |
parent | 37b1ae2386c365293249421595f0722c25bc8e8d (diff) |
vfclcm upgrade from python2 to python3
Change-Id: Ia55ae38ec64fc3d821d1e7e1c0cbe48b572a0dd4
Issue-ID: VFC-1429
Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
Diffstat (limited to 'lcm/docker')
-rwxr-xr-x | lcm/docker/Dockerfile | 2 | ||||
-rwxr-xr-x | lcm/docker/docker-env-conf.sh | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lcm/docker/Dockerfile b/lcm/docker/Dockerfile index 1507070e..34a7880a 100755 --- a/lcm/docker/Dockerfile +++ b/lcm/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM python:2-alpine +FROM python:3.6-alpine ARG HTTP_PROXY=${HTTP_PROXY} ARG HTTPS_PROXY=${HTTPS_PROXY} diff --git a/lcm/docker/docker-env-conf.sh b/lcm/docker/docker-env-conf.sh index b9389420..44119a6f 100755 --- a/lcm/docker/docker-env-conf.sh +++ b/lcm/docker/docker-env-conf.sh @@ -4,14 +4,14 @@ install_sf(){ apk --no-cache update apk --no-cache add bash curl gcc wget mysql-client openssl-dev - apk --no-cache add python-dev libffi-dev musl-dev py2-virtualenv + apk --no-cache add python36-dev libffi-dev musl-dev py3-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=${pkg_version}-SNAPSHOT&e=zip" && \ unzip vfc-gvnfm-vnflcm-lcm.zip && \ rm -rf vfc-gvnfm-vnflcm-lcm.zip wait - pip install --upgrade setuptools pip + pip install --upgrade setuptools pip pip install --no-cache-dir --pre -r /service/vfc/gvnfm/vnflcm/lcm/requirements.txt } @@ -44,9 +44,13 @@ clean_sf_cache(){ rm -rf /tmp/* } +patch_redisco_2py3(){ + sed -i 's/raise KeyError, value/raise KeyError(value)/g' /usr/local/lib/python3.6/site-packages/redisco/containers.py +} install_sf wait add_user config_logdir +patch_redisco_2py3 clean_sf_cache |