Dockerfile 310 B

123456789101112
  1. FROM node:16 AS base
  2. WORKDIR /code
  3. RUN npm config set registry https://registry.npmmirror.com
  4. ADD package.json yarn.lock /code/
  5. RUN yarn install --frozen-lockfile
  6. ADD . /code
  7. RUN yarn build
  8. FROM nginx:1.19-alpine
  9. COPY nginx.conf /etc/nginx/conf.d/nginx.conf
  10. COPY --from=base /code/dist /var/www/html/dist/