DigitalConsumer.FixMyGlass/Dockerfile.playwright
maguire-arman 07efa18134 Loads environment variables in Docker containers
Ensures environment variables defined in the env file are loaded
into the Docker containers used for Playwright tests. This is
achieved by sourcing the env file within the `docker create` command.

Removes the unnecessary CI=true environment variable setting.
2025-07-15 11:29:49 -04:00

18 lines
403 B
Docker

FROM mcr.microsoft.com/playwright:v1.48.0-noble
# Set the working directory in the container
WORKDIR /app
ARG NPM_CONFIG_USERCONFIG=/tmp/.npmrc
COPY playwright-tests/.npmrc /tmp/.npmrc
# Copy the application code
COPY . .
# Install dependencies
RUN npm ci
RUN npm --prefix playwright-tests ci
# Install Playwright browsers
RUN npx --prefix playwright-tests playwright install chromium --with-deps