From 3dc4e41b4f2ecf5bce4d4489033582163acdda32 Mon Sep 17 00:00:00 2001 From: Josua Mayer Date: Wed, 3 Sep 2025 15:13:41 +0200 Subject: [PATCH] Execute docker build-client step on build host, not target By default buildkit executes all steps using applications built for the target platform, if necessary by emulation. The audiobookshelf web client is not architecture-dependent and it's build takes a long time. Update Dockerfile to execute the build-client natively on the build platform, instead of the target platform. This drastically reduces docker build time for arm platforms on x86. --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 816bdd3c3..1d9f3f9e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ ARG NUSQLITE3_DIR="/usr/local/lib/nusqlite3" ARG NUSQLITE3_PATH="${NUSQLITE3_DIR}/libnusqlite3.so" ### STAGE 0: Build client ### -FROM node:20-alpine AS build-client +FROM --platform=$BUILDPLATFORM node:20-alpine AS build-client WORKDIR /client COPY /client /client