You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
441 B

  1. FROM node:16-alpine as build-stage
  2. WORKDIR /admim
  3. COPY .npmrc package.json yarn.lock ./
  4. RUN --mount=type=cache,id=yarn-store,target=/root/.yarn-store \
  5. yarn install --frozen-lockfile
  6. COPY . .
  7. ARG NODE_ENV=""
  8. RUN env ${NODE_ENV} yarn build:prod
  9. ## -- stage: dist => nginx --
  10. FROM nginx:alpine
  11. ENV TZ=Asia/Shanghai
  12. COPY ./nginx.conf /etc/nginx/conf.d/default.conf
  13. COPY --from=build-stage /admim/dist /usr/share/nginx/html
  14. EXPOSE 80