Skip to content
This repository has been archived by the owner on Jan 20, 2025. It is now read-only.

Commit

Permalink
fix Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
fabiodmota committed Feb 22, 2023
1 parent e2718f6 commit 319316d
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,16 @@ RUN npm run build

FROM nginxinc/nginx-unprivileged:stable-alpine

COPY .conf/nginx.conf /etc/nginx/conf.d/default.conf
WORKDIR /usr/share/nginx/html

COPY --from=compile-image /app/build /usr/share/nginx/html
COPY --from=compile-image /app/build .

# Change to root user for renaming of index.html to index.html.reference, to be used by env variables inject script
USER root
ENTRYPOINT ["nginx", "-g", "daemon off;"]

RUN mv /usr/share/nginx/html/index.html /usr/share/nginx/html/index.html.reference

EXPOSE 8080

# Install bash for env variables inject script
RUN apk update && apk add bash

# Make nginx owner of /usr/share/nginx/html/ and change to nginx user
RUN chown -R 101:101 /usr/share/nginx/html/
USER 101
EXPOSE 80



Expand Down

0 comments on commit 319316d

Please # to comment.