From d22c478c386318afd5ff618e4f4b4659242877bc Mon Sep 17 00:00:00 2001 From: Ruslan Bakiev <572431+veikab@users.noreply.github.com> Date: Fri, 20 Feb 2026 14:49:28 +0700 Subject: [PATCH] fix sharp binary installation in frontend image --- frontend/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/frontend/Dockerfile b/frontend/Dockerfile index 638a1c9..c0d4282 100644 --- a/frontend/Dockerfile +++ b/frontend/Dockerfile @@ -8,6 +8,15 @@ RUN apt-get update -y \ COPY package*.json ./ RUN npm ci --ignore-scripts --legacy-peer-deps +RUN set -eux; \ + arch="$(dpkg --print-architecture)"; \ + if [ "$arch" = "amd64" ]; then \ + npm rebuild sharp --platform=linux --arch=x64 || npm install --no-save sharp --platform=linux --arch=x64; \ + elif [ "$arch" = "arm64" ]; then \ + npm rebuild sharp --platform=linux --arch=arm64 || npm install --no-save sharp --platform=linux --arch=arm64; \ + else \ + npm rebuild sharp || true; \ + fi COPY . .