diff options
author | yangyan <yangyanyj@chinamobile.com> | 2020-03-12 16:53:44 +0800 |
---|---|---|
committer | yangyan <yangyanyj@chinamobile.com> | 2020-03-12 16:53:50 +0800 |
commit | 13487a71b3aa2356bfb0d3effc44b8b574b02feb (patch) | |
tree | 0d8d16d1ad32761ffa4d1e53baf0dbe525345871 | |
parent | 03147a604d4df8b5e4069a5bf51a3988a15b140e (diff) |
Optimize docker file of VFC-vnflcm
Change-Id: I350a7ea3d2ce643156bbad0047d865f35b49155f
Issue-ID: VFC-1647
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
-rwxr-xr-x | lcm/docker/docker-entrypoint.sh | 2 | ||||
-rwxr-xr-x | lcm/docker/docker-env-conf.sh | 11 |
2 files changed, 4 insertions, 9 deletions
diff --git a/lcm/docker/docker-entrypoint.sh b/lcm/docker/docker-entrypoint.sh index 4ba07578..9b01804a 100755 --- a/lcm/docker/docker-entrypoint.sh +++ b/lcm/docker/docker-entrypoint.sh @@ -1,7 +1,5 @@ #!/bin/bash -find /service -name '*.sh'|xargs chmod a+x - if [ -z "$SERVICE_IP" ]; then export SERVICE_IP=`hostname -i` fi diff --git a/lcm/docker/docker-env-conf.sh b/lcm/docker/docker-env-conf.sh index 8eb40c06..4ae228b8 100755 --- a/lcm/docker/docker-env-conf.sh +++ b/lcm/docker/docker-env-conf.sh @@ -13,26 +13,23 @@ install_sf(){ wait pip install --upgrade setuptools pip pip install --no-cache-dir --pre -r /service/vfc/gvnfm/vnflcm/lcm/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 } |