43 lines
815 B
Docker
43 lines
815 B
Docker
FROM node:22-bookworm-slim
|
|
|
|
# Install Playwright Chromium dependencies
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
libnss3 \
|
|
libnspr4 \
|
|
libatk1.0-0 \
|
|
libatk-bridge2.0-0 \
|
|
libcups2 \
|
|
libdrm2 \
|
|
libdbus-1-3 \
|
|
libxkbcommon0 \
|
|
libatspi2.0-0 \
|
|
libxcomposite1 \
|
|
libxdamage1 \
|
|
libxfixes3 \
|
|
libxrandr2 \
|
|
libgbm1 \
|
|
libpango-1.0-0 \
|
|
libcairo2 \
|
|
libasound2 \
|
|
libx11-xcb1 \
|
|
fonts-liberation \
|
|
fonts-noto-color-emoji \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY package*.json ./
|
|
RUN npm ci --production=false
|
|
|
|
# Install Playwright Chromium browser
|
|
RUN npx playwright install chromium
|
|
|
|
COPY tsconfig.json ./
|
|
COPY src/ ./src/
|
|
|
|
RUN npm run build
|
|
|
|
EXPOSE 3999
|
|
|
|
CMD ["node", "dist/cli.js", "preview", "--port", "3999"]
|