- FROM node:lts-alpine3.14 as build-stage
- WORKDIR /app
- COPY package.json /app/
- RUN yarn config set registry https://registry.npm.taobao.org -g && yarn install
- COPY . /app/
- RUN yarn build
- FROM nginx:alpine
- WORKDIR /app
- COPY --from=build-stage /app/dist /app
- COPY nginx/nginx.conf /etc/nginx/
- COPY nginx/conf.d/default.conf /etc/nginx/conf.d
- EXPOSE 8080
|