Selaa lähdekoodia

pref: 加速构建配置

wuwenyi 2 viikkoa sitten
vanhempi
commit
5656271ce5
2 muutettua tiedostoa jossa 8 lisäystä ja 1 poistoa
  1. 6 0
      .dockerignore
  2. 2 1
      Dockerfile

+ 6 - 0
.dockerignore

@@ -3,3 +3,9 @@ dist
 .git
 .idea
 *.iml
+*.md
+.DS_Store
+.gitignore
+docker-compose*.yml
+Dockerfile
+.dockerignore

+ 2 - 1
Dockerfile

@@ -1,8 +1,9 @@
+# syntax=docker/dockerfile:1
 FROM node:18-alpine AS build
 WORKDIR /app
 RUN npm config set registry https://registry.npmmirror.com
 COPY package*.json ./
-RUN npm ci --legacy-peer-deps
+RUN --mount=type=cache,target=/root/.npm npm ci --legacy-peer-deps
 COPY . .
 RUN npx vite build