1
- FROM mcr.microsoft.com/playwright:v1.50.1-noble AS rustbuilder
1
+ FROM ubuntu:25.04 AS rustbuilder
2
2
3
3
WORKDIR /app
4
4
5
5
# Get Ubuntu packages
6
6
RUN apt-get update && apt-get install -y \
7
7
build-essential \
8
- bash
8
+ bash curl \
9
+ && apt-get update
9
10
10
11
COPY ../headless_browser/ ./headless_browser
11
12
COPY ../headless_browser_lib/ ./headless_browser_lib
@@ -18,7 +19,7 @@ RUN rustup update stable
18
19
19
20
RUN RUST_LOG=error cargo install --no-default-features --path headless_browser
20
21
21
- FROM mcr.microsoft.com/playwright:v1.50.1-noble
22
+ FROM ubuntu:25.04 AS chromebuilder
22
23
23
24
ARG VERSION=latest
24
25
@@ -27,10 +28,27 @@ COPY ../local.conf /etc/fonts/local.conf
27
28
28
29
RUN apt-get update && apt-get install -y \
29
30
build-essential \
30
- tini curl
31
+ tini curl gpg ca-certificates npm
31
32
32
33
RUN ./build-unpatched.sh
33
34
35
+ FROM ubuntu:25.04
36
+
37
+ ARG VERSION=latest
38
+
39
+ COPY ../local.conf /etc/fonts/local.conf
40
+
41
+ # https://github.com/microsoft/playwright/blob/main/packages/playwright-core/src/server/registry/nativeDeps.ts#L37
42
+ RUN apt-get update && apt-get install --no-install-recommends -y \
43
+ libasound2t64 tini curl ca-certificates libfreetype6 \
44
+ libnspr4 libnss3 libexpat1 libgbm1 libfontconfig1 glib2.0 libatk1.0-0 \
45
+ fonts-liberation fonts-noto-color-emoji libatspi2.0-0 \
46
+ libc6 libcairo2 libcups2 libdbus-1-3 \
47
+ libgcc1 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libpango-1.0-0 \
48
+ libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 \
49
+ libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
50
+ fonts-liberation libatk-bridge2.0-0 libdrm2 libjpeg-turbo8
51
+
34
52
# Add Chrome as a user
35
53
RUN mkdir -p /usr/src/app \
36
54
&& useradd -m chrome \
@@ -41,6 +59,7 @@ EXPOSE 9222 6000 9223
41
59
USER root
42
60
43
61
COPY --from=rustbuilder /root/.cargo/bin/headless_browser /usr/local/bin/headless_browser
62
+ COPY --from=chromebuilder /out/latest/headless-shell /out/latest/headless-shell/
44
63
COPY ../scripts/docker-entrypoint.sh /
45
64
46
65
RUN chmod +x /docker-entrypoint.sh
0 commit comments