Change-Id: I8b67e7fb1b0d008187833cfb8c1752a6254f4ccf
Signed-off-by: preethika.p <preethika.p@tataelxsi.co.in>
# 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
labels:
app: ng-ui
spec:
+ securityContext:
+ runAsUser: 1000
+ runAsGroup: 1000
+ fsGroup: 1000
containers:
- name: ng-ui
image: opensourcemano/ng-ui:11