diff --git a/Dockerfile.playwright b/Dockerfile.playwright index bd66363f0..0e3543e68 100644 --- a/Dockerfile.playwright +++ b/Dockerfile.playwright @@ -5,14 +5,16 @@ 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 ./ +ARG NPM_CONFIG_USERCONFIG=/tmp/.npmrc + +COPY playwright-tests/.npmrc /tmp/.npmrc + +# Copy the application code +COPY . . # Install dependencies -RUN npm install +RUN npm ci +RUN npm --prefix playwright-tests ci # Install Playwright browsers -RUN npx playwright install chromium --with-deps - -# Copy the rest of the application code -COPY . . +RUN npx --prefix playwright-tests playwright install chromium --with-deps