Disable npm cache in Dockerfile

This commit is contained in:
Jerko Steiner 2019-11-18 23:29:16 -03:00
parent df23bcd932
commit 714b8f55db

View File

@ -11,12 +11,13 @@ RUN rm -rf node_modules build/index.prod.js
FROM node:12-alpine
WORKDIR /app
RUN chown node:node /app
USER node
COPY package.json .
RUN npm install --production
RUN npm install --production && rm -rf ~/.npm
COPY --from=0 /app .
USER root
RUN chown -R root:root .
USER node
EXPOSE 3000
STOPSIGNAL SIGINT
ENTRYPOINT ["node", "lib/index.js"]
# CMD ["node", "lib/index.js"]