Revert "Fix bug 1702 Adding non-root user to run NG-UI" 40/11740/2
authorbeierlm <mark.beierl@canonical.com>
Thu, 10 Mar 2022 11:48:00 +0000 (12:48 +0100)
committerbeierlm <mark.beierl@canonical.com>
Thu, 10 Mar 2022 13:37:48 +0000 (14:37 +0100)
This reverts commit b147d7129db4f7cae26a31230af184c958b20683.

Reason for revert: NG-UI Container does not start up due to non-root user

nginx: [warn] the "user" directive makes sense only if the master process runs with super-user privileges, ignored in /etc/nginx/nginx.conf:1
nginx: [emerg] bind() to 0.0.0.0:80 failed (13: Permission denied)

Change-Id: Ibc44fdfe57ca576df70f12f5bb868fe9045990b8
Signed-off-by: beierlm <mark.beierl@canonical.com>
docker/NG-UI/Dockerfile
installers/docker/osm_pods/ng-ui.yaml

index 6e9e79d..c4d67df 100644 (file)
@@ -65,14 +65,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get --yes update && \
 # Removing the Nginx default page.
 RUN rm -rf /usr/share/nginx/html/*
 
-# Creating the user for the app
-RUN groupadd -g 1000 appuser && \
-    useradd -u 1000 -g 1000 -d /usr appuser && \
-    chown -R appuser:appuser /usr /var/lib/nginx /var/log/nginx /etc/nginx /run
-
-# Changing the security context
-USER appuser
-
 # Copying Nginx configuration
 COPY --from=INSTALL /usr/share/osm-ngui/nginx/nginx.conf /etc/nginx/sites-available/default
 
index 3ce1e3b..f5b1658 100644 (file)
@@ -44,10 +44,6 @@ spec:
       labels:
         app: ng-ui
     spec:
-      securityContext:
-        runAsUser: 1000
-        runAsGroup: 1000
-        fsGroup: 1000
       containers:
       - name: ng-ui
         image: opensourcemano/ng-ui:11