From 19958dfd836cd829861155a672f41a541d5fdd58 Mon Sep 17 00:00:00 2001 From: Sergey Katsubo Date: Mon, 8 Dec 2025 18:15:43 +0300 Subject: [PATCH] fix(server): building docker image for different platforms on the same host (#24459) Fix building docker image for different platforms on the same host Use per-platform mise cache to avoid 'sh: 1: extism-js: not found' This happens due to re-using cached installed binary for another platform --- server/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server/Dockerfile b/server/Dockerfile index 267253ccd9..918658e19f 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -50,13 +50,15 @@ RUN --mount=type=cache,id=pnpm-cli,target=/buildcache/pnpm-store \ FROM builder AS plugins +ARG TARGETPLATFORM + COPY --from=ghcr.io/jdx/mise:2025.11.3@sha256:ac26f5978c0e2783f3e68e58ce75eddb83e41b89bf8747c503bac2aa9baf22c5 /usr/local/bin/mise /usr/local/bin/mise WORKDIR /usr/src/app COPY ./plugins/mise.toml ./plugins/ ENV MISE_TRUSTED_CONFIG_PATHS=/usr/src/app/plugins/mise.toml ENV MISE_DATA_DIR=/buildcache/mise -RUN --mount=type=cache,id=mise-tools,target=/buildcache/mise \ +RUN --mount=type=cache,id=mise-tools-${TARGETPLATFORM},target=/buildcache/mise \ mise install --cd plugins COPY ./plugins ./plugins/ @@ -66,7 +68,7 @@ RUN --mount=type=cache,id=pnpm-plugins,target=/buildcache/pnpm-store \ --mount=type=bind,source=.pnpmfile.cjs,target=.pnpmfile.cjs \ --mount=type=bind,source=pnpm-lock.yaml,target=pnpm-lock.yaml \ --mount=type=bind,source=pnpm-workspace.yaml,target=pnpm-workspace.yaml \ - --mount=type=cache,id=mise-tools,target=/buildcache/mise \ + --mount=type=cache,id=mise-tools-${TARGETPLATFORM},target=/buildcache/mise \ cd plugins && mise run build FROM ghcr.io/immich-app/base-server-prod:202511261514@sha256:c04c1c38dd90e53455b180aedf93c3c63474c8d20ffe2c6d7a3a61a2181e6d29