From 7fd71f27c8d9d7f5b456c4e162bb7835543b3e39 Mon Sep 17 00:00:00 2001 From: Oscar Date: Thu, 28 May 2026 15:44:25 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20refactor(Dockerfile):=20=D0=A3?= =?UTF-8?q?=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D1=8B=20=D0=BB=D0=B8=D1=88=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D1=83=D1=81=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=B5=D0=B9,=20=D0=BE=D0=BF=D1=82=D0=B8=D0=BC=D0=B8?= =?UTF-8?q?=D0=B7=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=D0=B0=20=D1=83=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D0=BD=D0=BE=D0=B2=D0=BA=D0=B0=20Playwright.tabs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3b6f912..156415e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,9 +13,6 @@ RUN corepack enable RUN yarn install --immutable -# install Chromium + all system dependencies for Playwright -RUN npx playwright install --with-deps chromium - COPY tsconfig.json ./ COPY prisma ./prisma COPY src ./src @@ -26,16 +23,18 @@ RUN yarn prisma generate FROM node:22-slim AS runner WORKDIR /app -RUN apt-get update && apt-get install -y --no-install-recommends \ - openssl \ - libnss3 libnspr4 libatk1.0-0 libatk-bridge2.0-0 libcups2 \ - libdrm2 libxkbcommon0 libxcomposite1 libxdamage1 libxfixes3 \ - libxrandr2 libgbm1 libasound2 \ - && rm -rf /var/lib/apt/lists/* +RUN apt-get update && apt-get install -y --no-install-recommends openssl && rm -rf /var/lib/apt/lists/* RUN corepack enable && npm install -g opencode-ai -COPY --from=builder /root/.cache/ms-playwright /root/.cache/ms-playwright COPY --from=builder /app/node_modules ./node_modules + +# Copy Playwright browser binary and install only system deps (no re-download) +# install Chromium + all system dependencies for Playwright +RUN npx playwright install --with-deps chromium + +COPY --from=builder /root/.cache/ms-playwright /root/.cache/ms-playwright +RUN npx playwright install-deps chromium + COPY --from=builder /app/src ./src COPY --from=builder /app/prisma ./prisma COPY package.json yarn.lock .yarnrc.yml tsconfig.json ./