diff --git a/Dockerfile b/Dockerfile index d322f85..819a591 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,10 +9,12 @@ RUN yarn build # Stage 2 - run FROM node:12-alpine WORKDIR /app -COPY --from=build-deps /usr/src/app/build /app/build -COPY --from=build-deps /usr/src/app/public /app/public -COPY --from=build-deps /usr/src/app/node_modules /app/node_modules +COPY --chown=node:node --from=build-deps /usr/src/app/build /app/build +COPY --chown=node:node --from=build-deps /usr/src/app/public /app/public +COPY --chown=node:node --from=build-deps /usr/src/app/node_modules /app/node_modules VOLUME /app/config VOLUME /app/content +RUN chown node:node /app +USER node EXPOSE 3000 CMD [ "node", "build/server.js" ]