14 lines
497 B
Docker
14 lines
497 B
Docker
# Use a Node.js base image with Playwright
|
|
FROM mcr.microsoft.com/playwright:v1.50.0-noble
|
|
# Set working directory inside the container
|
|
WORKDIR /app
|
|
# Copy package.json and package-lock.json for dependency installation
|
|
COPY package*.json ./
|
|
# Install the project dependencies
|
|
RUN npm install
|
|
# Copy the entire project
|
|
COPY . .
|
|
# Install Playwright browsers (chromium, firefox, webkit)
|
|
RUN npx playwright install --with-deps chromium
|
|
# Default command to run tests
|
|
CMD ["npx", "playwright", "test"] |