install playwright and chromium in image

This commit is contained in:
Zhi
2026-03-13 10:56:54 +00:00
parent a15de04895
commit 9b6377c787

View File

@@ -1,8 +1,8 @@
FROM mcr.microsoft.com/playwright:v1.40.0-bookworm FROM node:20-bookworm-slim
ENV CHROME_DEBUGGING_PORT=9222
WORKDIR /app WORKDIR /app
COPY package*.json ./ COPY package*.json ./
RUN npm install RUN npm install && npm install -g playwright && playwright install chromium
COPY . . COPY . .
ENV CHROME_DEBUGGING_PORT=9222
CMD ["npx", "playwright", "test"] CMD ["npx", "playwright", "test"]