From 46b32d6aa7c656cefc55cfbc3a3603bc4a9b8167 Mon Sep 17 00:00:00 2001 From: g00dvin Date: Thu, 11 Sep 2025 08:08:43 +0000 Subject: [PATCH] Change base image for OCI --- Dockerfile | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/Dockerfile b/Dockerfile index f95e58b..94123d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,46 +1,18 @@ -# Use official Node.js LTS base image -FROM node:20-slim +FROM mcr.microsoft.com/playwright:v1.42.0-jammy -# Install dependencies for running Chromium -RUN apt-get update && apt-get install -y \ - ca-certificates \ - fonts-liberation \ - libasound2 \ - libatk-bridge2.0-0 \ - libatk1.0-0 \ - libcups2 \ - libdbus-1-3 \ - libdrm2 \ - libgbm1 \ - libgtk-3-0 \ - libnspr4 \ - libnss3 \ - libx11-xcb1 \ - libxcomposite1 \ - libxdamage1 \ - libxrandr2 \ - xdg-utils \ - wget \ - --no-install-recommends && \ - rm -rf /var/lib/apt/lists/* - -# Set working directory WORKDIR /usr/src/app -# Copy package files and install dependencies COPY package*.json ./ COPY ignore-domains.txt ./ -RUN npm ci -# Install Playwright browsers (Chromium) +RUN npm ci --omit=dev RUN npx playwright install chromium -# Copy app sources COPY . . -# Expose port +RUN rm -rf /usr/local/share/doc /usr/local/share/man /usr/local/share/info + EXPOSE 3000 -# Run the service CMD ["npm", "start"]