Skip to content
Snippets Groups Projects
Commit 612508f1 authored by esikkala's avatar esikkala
Browse files

Use 'RUN chown..' to support old Docker versions

parent 0a41595f
No related branches found
No related tags found
No related merge requests found
......@@ -11,8 +11,6 @@ rm -rf /tmp/* /var/cache/apk/*
WORKDIR /opt/app
USER node
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
......@@ -23,7 +21,14 @@ COPY webpack*.js ./
COPY babel.config.js ./
# Bundle app source
COPY --chown=node src ./src
COPY src ./src
# If translations are fetched from Google Sheets API,
# the 'node' user needs to be able to write into this folder
RUN chown -R node:node ./src/client/translations
# https://github.com/nodejs/docker-node/blob/main/docs/BestPractices.md#non-root-user
USER node
# Run the scripts defined in package.json
RUN npm install && \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment