Dockerfile 473 B

1234567891011121314151617181920212223242526
  1. FROM node:6.13.0 as app
  2. COPY ./ /app
  3. WORKDIR /app
  4. RUN npm install
  5. RUN npm run compile:all
  6. FROM node:6.13.0
  7. COPY --from=app /app /app
  8. WORKDIR /app
  9. # All app and node_modules will be owned by root.
  10. # The app will run as the 'app' user, and so not have write permissions
  11. # on any files it doesn't need.
  12. RUN useradd --user-group --create-home --home-dir /app --shell /bin/false app
  13. RUN ./install_deps.sh
  14. ENTRYPOINT ["/bin/sh", "entrypoint.sh"]
  15. CMD ["node","app.js"]