Dockerfile 493 B

123456789101112131415161718192021222324
  1. # Create image based on the official Node image from dockerhub
  2. FROM node:lts-buster
  3. # Create app directory
  4. WORKDIR /usr/src/app
  5. # Copy dependency definitions
  6. COPY package.json /usr/src/app
  7. COPY package-lock.json /usr/src/app
  8. # Install dependecies
  9. #RUN npm set progress=false \
  10. # && npm config set depth 0 \
  11. # && npm i install
  12. RUN npm ci
  13. # Get all the code needed to run the app
  14. COPY . /usr/src/app
  15. # Expose the port the app runs in
  16. EXPOSE 3000
  17. # Serve the app
  18. CMD ["npm", "start"]