Change base image for OCI

This commit is contained in:
g00dvin 2025-09-11 08:08:43 +00:00
parent 7c2a58c894
commit 46b32d6aa7

View file

@ -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"]