Dockerfile 283 B

1234567891011
  1. # Build part
  2. FROM node:8.11.2-alpine as node
  3. WORKDIR /usr/src/app
  4. COPY . .
  5. RUN npm i npm@latest -g
  6. RUN npm i && npm run build
  7. #Run part
  8. FROM nginx:1.13.12-alpine
  9. COPY --from=node /usr/src/app/build/ /usr/share/nginx/html
  10. COPY ./nginx.conf /etc/nginx/conf.d/default.conf
  11. EXPOSE 80/tcp