Dockerfile 612 B

12345678910111213141516171819202122232425262728293031
  1. FROM node:10-slim
  2. # add curl for healthcheck
  3. RUN apt-get update \
  4. && apt-get install -y --no-install-recommends \
  5. curl \
  6. && rm -rf /var/lib/apt/lists/*
  7. # Add Tini for proper init of signals
  8. ENV TINI_VERSION v0.19.0
  9. ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
  10. RUN chmod +x /tini
  11. WORKDIR /app
  12. # have nodemon available for local dev use (file watching)
  13. RUN npm install -g nodemon
  14. COPY package*.json ./
  15. RUN npm ci \
  16. && npm cache clean --force \
  17. && mv /app/node_modules /node_modules
  18. COPY . .
  19. ENV PORT 80
  20. EXPOSE 80
  21. CMD ["/tini", "--", "node", "server.js"]