From 8f88c84555916de7c39c30548003ff9f56b8275b Mon Sep 17 00:00:00 2001 From: maguire-arman Date: Fri, 9 May 2025 15:11:43 -0400 Subject: [PATCH] Adds Playwright Dockerfile Creates a Dockerfile to run Playwright tests in a containerized environment. This Dockerfile: - Uses a Playwright base image. - Installs dependencies. - Installs Playwright browsers. - Installs jq. - Copies application code. This ensures consistent and reproducible test execution across different environments. --- Dockerfile.playwright | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile.playwright diff --git a/Dockerfile.playwright b/Dockerfile.playwright new file mode 100644 index 000000000..46a2114a2 --- /dev/null +++ b/Dockerfile.playwright @@ -0,0 +1,21 @@ +FROM node:20 + +FROM mcr.microsoft.com/playwright:v1.48.0-noble + +# Set the working directory in the container +WORKDIR /app + +# Copy package.json and package-lock.json +COPY package*.json ./ + +# Install dependencies +RUN npm install + +# Install Playwright browsers +RUN npx playwright install chromium --with-deps + +# Install jq +RUN apt-get install -y jq + +# Copy the rest of the application code +COPY . .