Fix VPS build: drop Docker cache mount unsupported on host daemon.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
fe3d153ef1
commit
7d7b55f060
1 file changed
+2
-2
@@ -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}"
|
export NODE_OPTIONS="${NODE_OPTIONS:---max-old-space-size=3072}"
|
||||||
|
|
||||||
echo "Building Next.js at $ROOT (Node 22 container)…"
|
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 DISABLE_REACT_COMPILER=1 \
|
||||||
-e NEXT_TELEMETRY_DISABLED=1 \
|
-e NEXT_TELEMETRY_DISABLED=1 \
|
||||||
-e NEXT_PUBLIC_SITE_URL \
|
-e NEXT_PUBLIC_SITE_URL \
|
||||||
-e NODE_OPTIONS \
|
-e NODE_OPTIONS \
|
||||||
-v "$ROOT:/app" -w /app \
|
-v "$ROOT:/app" -w /app \
|
||||||
--mount type=cache,target=/root/.npm \
|
|
||||||
node:22-alpine \
|
node:22-alpine \
|
||||||
sh -ec 'npm ci --no-audit --no-fund && npm run build'
|
sh -ec 'npm ci --no-audit --no-fund && npm run build'
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user