-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (23 loc) · 1.12 KB
/
Dockerfile
File metadata and controls
29 lines (23 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Base image for E2E testing
# Playwright + Bun + all browsers (Chromium, Firefox, WebKit, Chrome)
# Note: Using linux/amd64 because Google Chrome is not available for ARM64
ARG PLATFORM=linux/amd64
FROM --platform=${PLATFORM} mcr.microsoft.com/playwright:v1.57.0-jammy
LABEL org.opencontainers.image.title="playwright-bun"
LABEL org.opencontainers.image.description="Playwright with Bun runtime and all browsers (Chromium, Firefox, WebKit, Chrome)"
LABEL org.opencontainers.image.version="1.57.0"
LABEL org.opencontainers.image.authors="mosadif"
LABEL org.opencontainers.image.source="https://github.com/mosadif/playwright-bun"
LABEL org.opencontainers.image.licenses="MIT"
LABEL org.opencontainers.image.base.name="mcr.microsoft.com/playwright:v1.57.0-jammy"
# Install dependencies and Bun
RUN apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
# Working directory for mounting project
WORKDIR /app
# Install Google Chrome
RUN npx playwright install chrome
# Verify installation
RUN bun --version && npx playwright --version
CMD ["bash"]