Dockerfile 346 B

12345678910111213141516171819202122
  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. RUN useradd --user-group --create-home --home-dir /app --shell /bin/false app
  10. RUN [ -e ./install_deps.sh ] && ./install_deps.sh
  11. ENTRYPOINT ["/bin/sh", "entrypoint.sh"]
  12. CMD ["node","app.js"]