Dockerfile 353 B

12345678910111213141516
  1. FROM node:lts-alpine3.14 as build-stage
  2. WORKDIR /app
  3. COPY package.json /app/
  4. RUN yarn config set registry https://registry.npm.taobao.org -g && yarn install
  5. COPY . /app/
  6. RUN yarn build
  7. FROM nginx:alpine
  8. WORKDIR /app
  9. COPY --from=build-stage /app/dist /app
  10. COPY nginx/nginx.conf /etc/nginx/
  11. COPY nginx/conf.d/default.conf /etc/nginx/conf.d
  12. EXPOSE 8080