diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index 6c27d4f5..ca4df914 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -33,10 +33,18 @@ RUN apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y --no && rm -rf /var/lib/apt/lists/* # Install Node.js using official NodeSource script -RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \ - && apt-get install -y nodejs \ - && npm install -g yarn \ - && rm -rf /var/lib/apt/lists/* +# NodeSource supports: amd64, arm64, armhf (arm/v7) +# For unsupported architectures, fall back to Debian's nodejs package +RUN ARCH=$(dpkg --print-architecture) && \ + if [ "$ARCH" = "amd64" ] || [ "$ARCH" = "arm64" ] || [ "$ARCH" = "armhf" ]; then \ + curl -fsSL https://deb.nodesource.com/setup_22.x | bash - && \ + apt-get install -y nodejs; \ + else \ + apt-get update && \ + apt-get install -y nodejs npm; \ + fi && \ + npm install -g yarn && \ + rm -rf /var/lib/apt/lists/* # Use jemalloc with check for architecture RUN if [ "$(uname -m)" = "x86_64" ]; then \