| 12345678910111213 |
- # build stage
- FROM node:lts-alpine as build-stage
- WORKDIR /app
- COPY package*.json ./
- RUN npm config set registry https://registry.npm.taobao.org && npm install
- COPY . .
- RUN npm run build
- # production stage
- FROM nginx:stable-alpine as production-stage
- COPY --from=build-stage /app/dist /usr/share/nginx/html
- EXPOSE 8080
- CMD ["nginx", "-g", "daemon off;"]
|