diff --git a/Dockerfile b/Dockerfile index 2b1b6305..3376f53f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,8 @@ ARG PHP_VERSION=8.4 ARG NODE_VERSION=22 # Node.js build stage for building frontend assets -FROM node:${NODE_VERSION}-bookworm-slim AS node-builder +# Use native platform for build stage as it's platform-independent +FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-bookworm-slim AS node-builder WORKDIR /app diff --git a/Dockerfile-frankenphp b/Dockerfile-frankenphp index 05fd55c5..5f6a4b02 100644 --- a/Dockerfile-frankenphp +++ b/Dockerfile-frankenphp @@ -1,7 +1,8 @@ ARG NODE_VERSION=22 # Node.js build stage for building frontend assets -FROM node:${NODE_VERSION}-bookworm-slim AS node-builder +# Use native platform for build stage as it's platform-independent +FROM --platform=$BUILDPLATFORM node:${NODE_VERSION}-bookworm-slim AS node-builder WORKDIR /app