Skip to content

Commit

Permalink
Added explicit ownership to copied files to node in docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
SevLG committed Jan 11, 2024
1 parent f37751c commit 63700a6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ RUN chown -R node:node /usr
RUN chown -R node:node /tmp
USER node
# Cache and Install dependencies
COPY ./react-app/package.json .
COPY ./react-app/package-lock.json .
COPY --chown=node:node ./react-app/package.json .
COPY --chown=node:node ./react-app/package-lock.json .
RUN npm ci
RUN npm install react-scripts -g
# Copy app files
COPY ./react-app/ .
COPY --chown=node:node ./react-app/ .
RUN npm run build

# production environment
Expand Down

0 comments on commit 63700a6

Please sign in to comment.