diff --git a/.gitignore b/.gitignore index d3cc95d3f6..3ad3f88e52 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ build/ *.iws *.log .vscode +.devcontainer coverage diff --git a/Dockerfile b/Dockerfile index 553aac2792..66100029e4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,17 @@ -FROM nginx:alpine +FROM nginxinc/nginx-unprivileged:alpine LABEL maintainer="Andrei Varabyeu " LABEL version=5.7.4 ENV APP_DOWNLOAD_URL https://github.com/reportportal/service-ui/releases/download/v5.7.4 +USER root ADD ${APP_DOWNLOAD_URL}/ui.tar.gz / RUN tar -zxvf ui.tar.gz -C /usr/share/nginx/html && rm -f ui.tar.gz RUN rm /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/nginx.conf -EXPOSE 8080 +USER $UID + +EXPOSE 8080 \ No newline at end of file diff --git a/Dockerfile-full b/Dockerfile-full index d776921e40..e254467f3e 100644 --- a/Dockerfile-full +++ b/Dockerfile-full @@ -1,4 +1,5 @@ # Only for technical/build aims, built image will be with nginx:alpine according to the last step + FROM alpine:3.10.9 as generate-build-info RUN apk add git RUN apk add make @@ -15,10 +16,16 @@ COPY ./app/ /usr/src/app/ RUN export NODE_OPTIONS="--max-old-space-size=4096" RUN npm ci && npm run build && npm run test -FROM nginx:alpine +FROM nginxinc/nginx-unprivileged:alpine + +USER root + COPY --from=build-frontend /usr/src/app/build /usr/share/nginx/html COPY --from=generate-build-info /usr/src/app/build /usr/share/nginx/html + RUN rm /etc/nginx/conf.d/default.conf COPY nginx.conf /etc/nginx/nginx.conf +USER $UID + EXPOSE 8080