fix: preserve npm dependency cache across auth builds
This commit is contained in:
+2
-2
@@ -4,10 +4,10 @@ FROM node:20-alpine AS builder
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY package.json ./
|
COPY package.json ./
|
||||||
ARG NPM_REGISTRY=https://registry.npmmirror.com
|
ARG NPM_REGISTRY=https://registry.npmmirror.com
|
||||||
ARG VITE_AUTH_ENABLED=false
|
|
||||||
ENV VITE_AUTH_ENABLED=$VITE_AUTH_ENABLED
|
|
||||||
RUN npm config set registry "$NPM_REGISTRY" && npm install
|
RUN npm config set registry "$NPM_REGISTRY" && npm install
|
||||||
COPY . .
|
COPY . .
|
||||||
|
ARG VITE_AUTH_ENABLED=false
|
||||||
|
ENV VITE_AUTH_ENABLED=$VITE_AUTH_ENABLED
|
||||||
RUN npm run build
|
RUN npm run build
|
||||||
|
|
||||||
# 运行阶段
|
# 运行阶段
|
||||||
|
|||||||
Reference in New Issue
Block a user