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.
This commit is contained in:
Josua Mayer 2025-09-03 15:13:41 +02:00
parent 6ea70608a1
commit 3dc4e41b4f

View File

@ -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