From a6fa95e3f355dd0a12157744b8d0c084b6fc5e6b Mon Sep 17 00:00:00 2001 From: SysAdmin Date: Tue, 17 Mar 2026 00:17:10 +0000 Subject: [PATCH] fix(docker): use node:20-slim base image instead of unavailable Playwright image The Playwright Docker image v1.58.2-noble doesn't exist on MCR, breaking the CI build. Switch to node:20-slim and install Playwright chromium at build time for resilience against future version mismatches. Co-Authored-By: Claude Opus 4.6 (1M context) --- Dockerfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 605b85a..37d7a4d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,22 @@ -FROM mcr.microsoft.com/playwright/javascript:v1.58.2-noble +FROM node:20-slim + +RUN apt-get update && apt-get install -y --no-install-recommends \ + curl \ + && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY package.json package-lock.json* ./ RUN npm ci --production 2>/dev/null || npm install --production +# Install Playwright browsers + OS dependencies (chromium only to save space) +RUN npx playwright install --with-deps chromium + COPY src/ ./src/ -# Create cache directory owned by pwuser (default user in playwright image) -RUN mkdir -p /app/cache && chown -R pwuser:pwuser /app/cache +# Create cache directory +RUN mkdir -p /app/cache EXPOSE 3001 3002 -USER pwuser - CMD ["node", "src/index.js"]