26 lines
634 B
Docker
26 lines
634 B
Docker
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 install
|
|
|
|
# Install Chromium for Playwright (including system deps for headless rendering)
|
|
RUN npx playwright install --with-deps chromium
|
|
|
|
# Ensure EGL/GLES libraries are available for SwiftShader WebGL rendering
|
|
RUN apt-get update && \
|
|
apt-get install -y --no-install-recommends libegl1 libgles2 && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY tsconfig.json ./
|
|
COPY src/ src/
|
|
RUN npm run build
|
|
|
|
EXPOSE 8002
|
|
|
|
CMD ["node", "dist/server.js"]
|