Optimize docker file of VFC-catalog 74/103574/1 frankfurt master
authoryangyan <yangyanyj@chinamobile.com>
Thu, 12 Mar 2020 08:44:41 +0000 (16:44 +0800)
committeryangyan <yangyanyj@chinamobile.com>
Thu, 12 Mar 2020 08:44:46 +0000 (16:44 +0800)
Change-Id: If052af18809702a8ff45e2b5da3b7a8120eacd07
Issue-ID: VFC-1647
Signed-off-by: yangyan <yangyanyj@chinamobile.com>
docker/docker-entrypoint.sh
docker/docker-env-conf.sh

index 8913667..759c271 100755 (executable)
@@ -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
index 75a9d3f..504c0bd 100755 (executable)
@@ -13,28 +13,23 @@ install_sf(){
     rm -rf vfc-nfvo-catalog.zip && \
     pip install --upgrade setuptools pip && \
     pip install --no-cache-dir --pre -r  /service/vfc/nfvo/catalog/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
-    fi 
-   
-    sudo chown onap:onap -R /var/log/onap
+       mkdir /var/log/onap
+    fi
+    chown onap:onap -R /var/log/onap
     chmod g+s /var/log/onap
-    
 }
 
 clean_sf_cache(){