diff options
author | 2019-04-17 11:32:48 +0800 | |
---|---|---|
committer | 2019-04-17 11:33:05 +0800 | |
commit | 29520a4f26aba16441e4c50714ea3f72f5d6c506 (patch) | |
tree | 5bac667c65f6a90fb086b45a02178093d51c773a | |
parent | 8f83725e5f8bc58932857f3b56033a86738bcb99 (diff) |
Modify catalog docker file
Change-Id: I77ef21cee56873d696570ba28352bb864b92baef
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
Issue-ID: VFC-1360
-rw-r--r-- | docker/docker-env-conf.sh | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/docker/docker-env-conf.sh b/docker/docker-env-conf.sh index 5f5c1bd5..6e610ca7 100644 --- a/docker/docker-env-conf.sh +++ b/docker/docker-env-conf.sh @@ -1,6 +1,6 @@ #!/bin/bash -install_sf(){ +config_env(){ sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories apk --no-cache update @@ -8,15 +8,14 @@ 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-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' && \ unzip vfc-nfvo-catalog.zip && \ rm -rf vfc-nfvo-catalog.zip && \ - pip install --upgrade setuptools pip -i https://mirrors.aliyun.com/pypi/simple/ && \ - pip install --no-cache-dir --pre -r /service/vfc/nfvo/catalog/requirements.txt -i https://mirrors.aliyun.com/pypi/simple/ + pip install --upgrade setuptools pip && \ + pip install --no-cache-dir --pre -r /service/vfc/nfvo/catalog/requirements.txt } -add_user(){ +add_onap(){ apk --no-cache add sudo addgroup -g 1000 -S onap && \ @@ -24,32 +23,20 @@ add_user(){ chmod u+w /etc/sudoers && \ sed -i '/User privilege/a\\onap ALL=(ALL:ALL) NOPASSWD:ALL' /etc/sudoers && \ chmod u-x /etc/sudoers && \ - sudo chown onap:onap -R /service -} - -config_logdir(){ - - if [ ! -d "/var/log/onap" ]; then - sudo mkdir /var/log/onap - fi - - sudo chown onap:onap -R /var/log/onap - chmod g+s /var/log/onap - + chown onap:onap -R /service } -clean_sf_cache(){ +clean_env(){ rm -rf /var/cache/apk/* rm -rf /root/.cache/pip/* rm -rf /tmp/* } -install_sf +config_env wait -add_user -config_logdir -clean_sf_cache +add_onap +clean_env |