From a222939aa612c50b3f78844e7dc8b21a6019eeb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20B=C3=B6hmer?= Date: Mon, 16 Feb 2026 12:12:46 +0100 Subject: [PATCH] add target arch to dockerfile caches, to avoid problems --- Dockerfile | 8 ++++---- Dockerfile-frankenphp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index f56c9e8b..0e173247 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,8 @@ WORKDIR /app COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # Use BuildKit cache mounts for apt in builder stage -RUN --mount=type=cache,id=apt-cache-node,target=/var/cache/apt \ - --mount=type=cache,id=apt-lists-node,target=/var/lib/apt/lists \ +RUN --mount=type=cache,id=apt-cache-node-$TARGETARCH,target=/var/cache/apt \ + --mount=type=cache,id=apt-lists-node-$TARGETARCH,target=/var/lib/apt/lists \ apt-get update && apt-get install -y --no-install-recommends \ php-cli \ php-xml \ @@ -67,8 +67,8 @@ FROM ${BASE_IMAGE} AS base ARG PHP_VERSION # Use BuildKit cache mounts for apt in base stage -RUN --mount=type=cache,id=apt-cache,target=/var/cache/apt \ - --mount=type=cache,id=apt-lists,target=/var/lib/apt/lists \ +RUN --mount=type=cache,id=apt-cache-$TARGETARCH,target=/var/cache/apt \ + --mount=type=cache,id=apt-lists-$TARGETARCH,target=/var/lib/apt/lists \ apt-get update && apt-get -y install \ apt-transport-https \ lsb-release \ diff --git a/Dockerfile-frankenphp b/Dockerfile-frankenphp index e5912119..7525fb12 100644 --- a/Dockerfile-frankenphp +++ b/Dockerfile-frankenphp @@ -10,8 +10,8 @@ WORKDIR /app COPY --from=composer:latest /usr/bin/composer /usr/bin/composer # Use BuildKit cache mounts for apt in builder stage -RUN --mount=type=cache,id=apt-cache-node,target=/var/cache/apt \ - --mount=type=cache,id=apt-lists-node,target=/var/lib/apt/lists \ +RUN --mount=type=cache,id=apt-cache-node-$TARGETARCH,target=/var/cache/apt \ + --mount=type=cache,id=apt-lists-node-$TARGETARCH,target=/var/lib/apt/lists \ apt-get update && apt-get install -y --no-install-recommends \ php-cli \ php-xml \ @@ -64,8 +64,8 @@ RUN yarn cache clean && rm -rf node_modules/ # FrankenPHP base stage FROM dunglas/frankenphp:1-php8.4 AS frankenphp_upstream -RUN --mount=type=cache,id=apt-cache,target=/var/cache/apt \ - --mount=type=cache,id=apt-lists,target=/var/lib/apt/lists \ +RUN --mount=type=cache,id=apt-cache-$TARGETARCH,target=/var/cache/apt \ + --mount=type=cache,id=apt-lists-$TARGETARCH,target=/var/lib/apt/lists \ apt-get update && apt-get -y install \ curl \ ca-certificates \