Dockerfile 333 B

12345678910111213141516171819202122
  1. FROM node:10.19.0 as app
  2. WORKDIR /app
  3. #wildcard as some files may not be in all repos
  4. COPY package*.json npm-shrink*.json /app/
  5. RUN npm install --quiet
  6. COPY . /app
  7. FROM node:10.19.0
  8. COPY --from=app /app /app
  9. WORKDIR /app
  10. RUN chmod 0755 ./install_deps.sh && ./install_deps.sh
  11. USER node
  12. CMD ["node", "--expose-gc", "app.js"]