changing frontend docker image to unprevilege image

Signed-off-by: Raj Babu Das <raj.das@mayadata.io>
This commit is contained in:
Raj Babu Das 2020-11-04 21:25:22 +05:30
parent 6eada59f67
commit 59f6fd69ab
5 changed files with 11 additions and 6 deletions

View File

@ -41,7 +41,7 @@ spec:
ports:
- name: http
port: 9091
targetPort: 80
targetPort: 8080
selector:
component: litmusportal-frontend
---

View File

@ -55,7 +55,7 @@ spec:
ports:
- name: http
port: 9091
targetPort: 80
targetPort: 8080
selector:
component: litmusportal-frontend
---

View File

@ -23,9 +23,14 @@ COPY . ./
RUN npm run build
# Stage 2: the production environment
FROM nginx:alpine
FROM nginxinc/nginx-unprivileged
# Add Maintainer Info
LABEL maintainer="LitmusChaos"
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=react-build /frontend/build /usr/share/nginx/html
EXPOSE 80
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]

View File

@ -1,5 +1,5 @@
server {
listen 80;
listen 8080;
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;

View File

@ -50,7 +50,7 @@ spec:
ports:
- name: http
port: 9091
targetPort: 80
targetPort: 8080
selector:
component: litmusportal-frontend
---