Fix VPS build: drop Docker cache mount unsupported on host daemon.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
smhk1376andCursor committed 2026-10-20 01:22:27 +03:30
1 parent fe3d153ef1
commit 7d7b55f060
1 file changed
+2 -2
+2 -2
View File
@@ -12,13 +12,13 @@ export NEXT_PUBLIC_SITE_URL="${NEXT_PUBLIC_SITE_URL:-https://edu.mstaut.ir}"
export NODE_OPTIONS="${NODE_OPTIONS:---max-old-space-size=3072}"
echo "Building Next.js at $ROOT (Node 22 container)…"
DOCKER_BUILDKIT=1 docker run --rm \
# No BuildKit cache mounts — stock docker on the VPS does not support type=cache.
docker run --rm \
-e DISABLE_REACT_COMPILER=1 \
-e NEXT_TELEMETRY_DISABLED=1 \
-e NEXT_PUBLIC_SITE_URL \
-e NODE_OPTIONS \
-v "$ROOT:/app" -w /app \
--mount type=cache,target=/root/.npm \
node:22-alpine \
sh -ec 'npm ci --no-audit --no-fund && npm run build'