Browse Source

Merge pull request #2148 from mattray/1.106.0-opencost-ui

Remove non-root user to restore UI
Ajay Tripathy 2 years ago
parent
commit
04176c376c
2 changed files with 2 additions and 17 deletions
  1. 1 9
      ui/Dockerfile
  2. 1 8
      ui/Dockerfile.cross

+ 1 - 9
ui/Dockerfile

@@ -9,17 +9,9 @@ FROM nginx:alpine
 COPY --from=builder /opt/ui/dist /var/www
 COPY default.nginx.conf /etc/nginx/conf.d/
 COPY nginx.conf /etc/nginx/
-RUN rm -rf /etc/nginx/conf.d/default.conf
-
-RUN adduser 1001 -g 1000 -D
-RUN chown 1001:1000 -R /var/www
-RUN chown 1001:1000 -R /etc/nginx
 
 ENV BASE_URL=/model
 
-
-USER 1001
-
 COPY ./docker-entrypoint.sh /usr/local/bin/
 ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
-CMD ["nginx", "-g", "daemon off;"]
+CMD ["nginx", "-g", "daemon off;"]

+ 1 - 8
ui/Dockerfile.cross

@@ -1,17 +1,10 @@
 FROM nginx:alpine
-
 COPY ./dist /var/www
 COPY default.nginx.conf /etc/nginx/conf.d/
 COPY nginx.conf /etc/nginx/
-COPY ./docker-entrypoint.sh /usr/local/bin/
-
-RUN adduser 1001 -g 1000 -D
-RUN chown 1001:1000 -R /var/www
-RUN chown 1001:1000 -R /etc/nginx
 
 ENV BASE_URL=/model
 
-USER 1001
-
+COPY ./docker-entrypoint.sh /usr/local/bin/
 ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"]
 CMD ["nginx", "-g", "daemon off;"]