diff options
author | yangyan <yangyanyj@chinamobile.com> | 2020-03-12 16:49:16 +0800 |
---|---|---|
committer | yangyan <yangyanyj@chinamobile.com> | 2020-03-12 16:49:28 +0800 |
commit | 18e4e0cee126c29292d17daae2cb85eda346b262 (patch) | |
tree | b251770d00dd30bc70488f41ac71be0f548f75db | |
parent | 84aa9abd2b88427eab99676b893221d08ef1a27c (diff) |
Optimize docker file of VFC-svnfm-zte
Change-Id: I0e2cd74bf945298430c9a78f17852383e2ca9b0f
Issue-ID: VFC-1647
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rwxr-xr-x | zte/vmanager/docker/docker-entrypoint.sh | 3 | ||||
-rwxr-xr-x | zte/vmanager/docker/docker-env-conf.sh | 12 |
2 files changed, 4 insertions, 11 deletions
diff --git a/zte/vmanager/docker/docker-entrypoint.sh b/zte/vmanager/docker/docker-entrypoint.sh index 3c731640..38ea9778 100755 --- a/zte/vmanager/docker/docker-entrypoint.sh +++ b/zte/vmanager/docker/docker-entrypoint.sh @@ -1,8 +1,5 @@ #!/bin/bash -sudo chown onap:onap -R /service -find /service -name '*.sh'|xargs chmod a+x - if [ -z "$SERVICE_IP" ]; then export SERVICE_IP=`hostname -i` fi diff --git a/zte/vmanager/docker/docker-env-conf.sh b/zte/vmanager/docker/docker-env-conf.sh index 07a80556..b32a0130 100755 --- a/zte/vmanager/docker/docker-env-conf.sh +++ b/zte/vmanager/docker/docker-env-conf.sh @@ -13,26 +13,22 @@ install_sf(){ wait pip install --upgrade setuptools pip pip install --no-cache-dir --pre -r /service/vfc/nfvo/driver/vnfm/svnfm/zte/vmanager/requirements.txt + find /service -name '*.sh'|xargs chmod a+x } add_user(){ - apk --no-cache add sudo addgroup -g 1000 -S onap adduser onap -D -G onap -u 1000 - 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 + chown onap:onap -R /service } config_logdir(){ if [ ! -d "/var/log/onap" ]; then - sudo mkdir /var/log/onap + mkdir /var/log/onap fi - - sudo chown onap:onap -R /var/log/onap + chown onap:onap -R /var/log/onap chmod g+s /var/log/onap } |