Dockerfile 347 B

123456789101112131415161718192021222324
  1. FROM node:12-alpine
  2. RUN apk add --update bash
  3. # Setting working directory.
  4. WORKDIR /usr/src/app
  5. # Installing dependencies
  6. COPY package*.json ./
  7. RUN npm install
  8. # Copying source files
  9. COPY . .
  10. # Give permission to run script
  11. RUN chmod +x ./wait-for-it.sh
  12. # Build files
  13. RUN npm run build
  14. EXPOSE 3000
  15. # Running the app
  16. CMD [ "npm", "start" ]