- FROM node:lts-alpine3.14 as build-stage
- WORKDIR /app
- COPY package.json /app/
- RUN npm install --registry=https://repo.huaweicloud.com/repository/npm/
- COPY . /app/
- RUN npm run 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
|