Dockerfile 503 B

123456789101112131415161718192021
  1. FROM node:lts-alpine
  2. # install simple http server for serving static content
  3. RUN npm install -g http-server
  4. # make the 'app' folder the current working directory
  5. # copy both 'package.json' and 'package-lock.json' (if available)
  6. COPY package*.json ./
  7. # install project dependencies
  8. RUN npm install
  9. # copy project files and folders to the current working directory (i.e. 'app' folder)
  10. COPY . .
  11. # build app for production with minification
  12. RUN npm run build
  13. EXPOSE 8080
  14. CMD [ "http-server", "dist" ]