23 lines
417 B
Docker
23 lines
417 B
Docker
FROM mcr.microsoft.com/playwright:v1.41.0-jammy
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy E2E test files
|
|
COPY ./e2e/package*.json ./e2e/
|
|
RUN cd e2e && npm ci
|
|
|
|
COPY ./e2e ./e2e
|
|
|
|
# Install Playwright browsers
|
|
RUN cd e2e && npx playwright install
|
|
|
|
# Set up non-root user
|
|
RUN useradd -m -u 1001 testuser && \
|
|
chown -R testuser:testuser /app
|
|
|
|
USER testuser
|
|
|
|
WORKDIR /app/e2e
|
|
|
|
# Default command runs tests
|
|
CMD ["npx", "playwright", "test"] |