Dockerfile.bak 348 B

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