# Playwright Test Runner Dockerfile # Optimized container for running HVAC testing framework FROM mcr.microsoft.com/playwright:v1.40.0-focal # Set working directory WORKDIR /app # Install Node.js dependencies COPY package.json package-lock.json* ./ RUN npm ci --only=production && npm cache clean --force # Install additional utilities RUN apt-get update && apt-get install -y \ curl \ jq \ git \ && rm -rf /var/lib/apt/lists/* # Create evidence directory RUN mkdir -p /app/evidence/{screenshots,videos,reports,logs} # Copy test framework COPY . . # Set permissions RUN chmod +x /app/scripts/*.sh # Set environment variables for testing ENV NODE_ENV=test ENV HEADLESS=true ENV CI=true ENV PLAYWRIGHT_BROWSERS_PATH=/ms/playwright # Default command CMD ["npm", "test"] # Health check HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \ CMD curl -f http://localhost:3000/health || exit 1