1
- FROM ubuntu:18.04
1
+ # Mirror until official release
2
+ # https://github.com/microsoft/playwright/blob/ec3ee660430336d47a309553981eb960e49c2ede/docs/docker/Dockerfile.bionic
3
+ FROM ubuntu:bionic
2
4
3
- RUN apt-get update &&\
4
- # install Node.js
5
- # https://github.com/nodesource/distributions
6
- apt-get -y install curl \
7
- # native node add-ons
8
- gcc g++ make &&\
9
- curl -sL https://deb.nodesource.com/setup_12.x | bash - &&\
10
- apt-get -y install build-essential nodejs \
11
- # install xvfb
12
- xvfb \
13
- # chromium dependencies
14
- # https://github.com/microsoft/playwright/blob/master/docs/troubleshooting.md#chrome-headless-doesnt-launch-on-linuxwsl
15
- gconf-service \
16
- libasound2 \
17
- libatk1.0-0 \
18
- libatk-bridge2.0-0 \
19
- libc6 \
20
- libcairo2 \
21
- libcups2 \
22
- libdbus-1-3 \
23
- libexpat1 \
24
- libfontconfig1 \
25
- libgcc1 \
26
- libgconf-2-4 \
27
- libgdk-pixbuf2.0-0 \
28
- libglib2.0-0 \
29
- libgtk-3-0 \
30
- libnspr4 \
31
- libpango-1.0-0 \
32
- libpangocairo-1.0-0 \
33
- libstdc++6 \
34
- libx11-6 \
35
- libx11-xcb1 \
36
- libxcb1 \
37
- libxcomposite1 \
38
- libxcursor1 \
39
- libxdamage1 \
40
- libxext6 \
41
- libxfixes3 \
42
- libxi6 \
43
- libxrandr2 \
44
- libxrender1 \
45
- libxss1 \
46
- libxtst6 \
47
- ca-certificates \
48
- fonts-liberation \
49
- libappindicator1 \
50
- libnss3 \
51
- lsb-release \
52
- xdg-utils \
53
- wget \
54
- libgbm1 \
55
- # webkit dependencies
56
- # https://github.com/microsoft/playwright/blob/fce3842011f9be13717bd259ca3b30cdb0b36960/.github/workflows/webkit-linux.yml#L29
57
- libwoff1 \
5
+ # 1. Install node12
6
+ RUN apt-get update && apt-get install -y curl && \
7
+ curl -sL https://deb.nodesource.com/setup_12.x | bash - && \
8
+ apt-get install -y nodejs
9
+
10
+ # 2. Install WebKit dependencies
11
+ RUN apt-get install -y libwoff1 \
58
12
libopus0 \
59
13
libwebp6 \
60
14
libwebpdemux2 \
@@ -64,15 +18,42 @@ RUN apt-get update &&\
64
18
libhyphen0 \
65
19
libgdk-pixbuf2.0-0 \
66
20
libegl1 \
67
- libgles2 \
21
+ libnotify4 \
22
+ libxslt1.1 \
68
23
libevent-2.1-6 \
24
+ libgles2 \
25
+ libvpx5 \
26
+ # qawolf
27
+ libgles2 \
69
28
libnotify4 \
70
- libvpx5 \
71
- libxslt1.1 && \
72
- # free up space
73
- apt-get clean
29
+ libglu1-mesa
30
+
31
+
32
+ # 3. Install Chromium dependencies
33
+
34
+ RUN apt-get install -y libnss3 \
35
+ libxss1 \
36
+ libasound2 \
37
+ # qawolf
38
+ libgbm1
39
+
40
+ # 4. Install Firefox dependencies
41
+
42
+ RUN apt-get install -y libdbus-glib-1-2 \
43
+ # qawolf
44
+ libxext6 \
45
+ libxt6 \
46
+ libxtst6
47
+
48
+ # qawolf
49
+ # Does not allow npm install
50
+ # # 5. Add user so we don't need --no-sandbox in Chromium
51
+ # RUN groupadd -r pwuser && useradd -r -g pwuser -G audio,video pwuser \
52
+ # && mkdir -p /home/pwuser/Downloads \
53
+ # && chown -R pwuser:pwuser /home/pwuser
54
+
55
+ # # 6. (Optional) Install XVFB if there's a need to run browsers in headful mode
56
+ # RUN apt-get install -y xvfb
74
57
75
- # disable "Chrome is being controlled by automated test software"
76
- # https://github.com/jitsi/jibri/issues/208#issuecomment-518285349
77
- # https://www.chromium.org/administrators/linux-quick-start
78
- RUN mkdir -p /etc/opt/chrome/policies/managed && echo "{ \" CommandLineFlagSecurityWarningsEnabled\" : false }" > /etc/opt/chrome/policies/managed/managed_policies.json
58
+ # # Run everything after as non-privileged user.
59
+ # USER pwuser
0 commit comments