This commit is contained in:
Max Schmitt 2024-06-03 12:47:16 +02:00 коммит произвёл GitHub
Родитель 0203fed0c2
Коммит 2c6fd722dd
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
12 изменённых файлов: 324 добавлений и 10 удалений

4
.github/workflows/tests_secondary.yml поставляемый
Просмотреть файл

@ -31,7 +31,7 @@ jobs:
fail-fast: false
matrix:
browser: [chromium, firefox, webkit]
os: [ubuntu-20.04]
os: [ubuntu-20.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
@ -116,7 +116,7 @@ jobs:
fail-fast: false
matrix:
browser: [chromium, firefox, webkit]
os: [ubuntu-20.04, ubuntu-22.04, macos-14, windows-latest]
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-14, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

Просмотреть файл

@ -111,6 +111,7 @@ We currently publish images with the following tags:
- `:next` - tip-of-tree image version based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:next-jammy` - tip-of-tree image version based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v%%VERSION%%` - Playwright v%%VERSION%% release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v%%VERSION%%-noble` - Playwright v%%VERSION%% release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
- `:v%%VERSION%%-jammy` - Playwright v%%VERSION%% release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
- `:v%%VERSION%%-focal` - Playwright v%%VERSION%% release docker image based on Ubuntu 20.04 LTS (Focal Fossa).
@ -121,6 +122,7 @@ It is recommended to always pin your Docker image to a specific version if possi
### Base images
We currently publish images based on the following [Ubuntu](https://hub.docker.com/_/ubuntu) versions:
- **Ubuntu 24.04 LTS** (Noble Numbat), image tags include `noble`
- **Ubuntu 22.04 LTS** (Jammy Jellyfish), image tags include `jammy`
- **Ubuntu 20.04 LTS** (Focal Fossa), image tags include `focal`

Просмотреть файл

@ -183,7 +183,7 @@ See our doc on [Running and Debugging Tests](./running-tests.md) to learn more a
- Playwright is distributed as a .NET Standard 2.0 library. We recommend .NET 8.
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04, on x86-64 and arm64 architecture.
## What's next

Просмотреть файл

@ -131,7 +131,7 @@ By default browsers launched with Playwright run headless, meaning no browser UI
- Java 8 or higher.
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04, on x86-64 and arm64 architecture.
## What's next

Просмотреть файл

@ -289,7 +289,7 @@ pnpm exec playwright --version
- Node.js 18+
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, with x86-64 or arm64 architecture.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04, on x86-64 and arm64 architecture.
## What's next

Просмотреть файл

@ -102,7 +102,7 @@ pip install pytest-playwright playwright -U
- Python 3.8 or higher.
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04, on x86-64 and arm64 architecture.
## What's next

Просмотреть файл

@ -80,9 +80,11 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
'ubuntu18.04-x64': undefined,
'ubuntu20.04-x64': 'builds/chromium/%s/chromium-linux.zip',
'ubuntu22.04-x64': 'builds/chromium/%s/chromium-linux.zip',
'ubuntu24.04-x64': 'builds/chromium/%s/chromium-linux.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
'ubuntu22.04-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
'ubuntu24.04-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
'debian11-x64': 'builds/chromium/%s/chromium-linux.zip',
'debian11-arm64': 'builds/chromium/%s/chromium-linux-arm64.zip',
'debian12-x64': 'builds/chromium/%s/chromium-linux.zip',
@ -105,9 +107,11 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
'ubuntu18.04-x64': undefined,
'ubuntu20.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
'ubuntu22.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
'ubuntu24.04-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'ubuntu22.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'ubuntu24.04-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'debian11-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
'debian11-arm64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux-arm64.zip',
'debian12-x64': 'builds/chromium-tip-of-tree/%s/chromium-tip-of-tree-linux.zip',
@ -130,9 +134,11 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
'ubuntu18.04-x64': undefined,
'ubuntu20.04-x64': 'builds/firefox/%s/firefox-ubuntu-20.04.zip',
'ubuntu22.04-x64': 'builds/firefox/%s/firefox-ubuntu-22.04.zip',
'ubuntu24.04-x64': 'builds/firefox/%s/firefox-ubuntu-24.04.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': 'builds/firefox/%s/firefox-ubuntu-20.04-arm64.zip',
'ubuntu22.04-arm64': 'builds/firefox/%s/firefox-ubuntu-22.04-arm64.zip',
'ubuntu24.04-arm64': 'builds/firefox/%s/firefox-ubuntu-24.04-arm64.zip',
'debian11-x64': 'builds/firefox/%s/firefox-debian-11.zip',
'debian11-arm64': 'builds/firefox/%s/firefox-debian-11-arm64.zip',
'debian12-x64': 'builds/firefox/%s/firefox-debian-12.zip',
@ -155,9 +161,11 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
'ubuntu18.04-x64': undefined,
'ubuntu20.04-x64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-20.04.zip',
'ubuntu22.04-x64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-22.04.zip',
'ubuntu24.04-x64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-24.04.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': undefined,
'ubuntu22.04-arm64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-22.04-arm64.zip',
'ubuntu24.04-arm64': 'builds/firefox-beta/%s/firefox-beta-ubuntu-24.04-arm64.zip',
'debian11-x64': 'builds/firefox-beta/%s/firefox-beta-debian-11.zip',
'debian11-arm64': 'builds/firefox-beta/%s/firefox-beta-debian-11-arm64.zip',
'debian12-x64': 'builds/firefox-beta/%s/firefox-beta-debian-12.zip',
@ -180,9 +188,11 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
'ubuntu18.04-x64': undefined,
'ubuntu20.04-x64': 'builds/webkit/%s/webkit-ubuntu-20.04.zip',
'ubuntu22.04-x64': 'builds/webkit/%s/webkit-ubuntu-22.04.zip',
'ubuntu24.04-x64': 'builds/webkit/%s/webkit-ubuntu-24.04.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': 'builds/webkit/%s/webkit-ubuntu-20.04-arm64.zip',
'ubuntu22.04-arm64': 'builds/webkit/%s/webkit-ubuntu-22.04-arm64.zip',
'ubuntu24.04-arm64': 'builds/webkit/%s/webkit-ubuntu-24.04-arm64.zip',
'debian11-x64': 'builds/webkit/%s/webkit-debian-11.zip',
'debian11-arm64': 'builds/webkit/%s/webkit-debian-11-arm64.zip',
'debian12-x64': 'builds/webkit/%s/webkit-debian-12.zip',
@ -205,9 +215,11 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
'ubuntu18.04-x64': undefined,
'ubuntu20.04-x64': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
'ubuntu22.04-x64': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
'ubuntu24.04-x64': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'ubuntu22.04-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'ubuntu24.04-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'debian11-x64': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
'debian11-arm64': 'builds/ffmpeg/%s/ffmpeg-linux-arm64.zip',
'debian12-x64': 'builds/ffmpeg/%s/ffmpeg-linux.zip',
@ -230,9 +242,11 @@ const DOWNLOAD_PATHS: Record<BrowserName | InternalTool, DownloadPaths> = {
'ubuntu18.04-x64': undefined,
'ubuntu20.04-x64': 'builds/android/%s/android.zip',
'ubuntu22.04-x64': 'builds/android/%s/android.zip',
'ubuntu24.04-x64': 'builds/android/%s/android.zip',
'ubuntu18.04-arm64': undefined,
'ubuntu20.04-arm64': 'builds/android/%s/android.zip',
'ubuntu22.04-arm64': 'builds/android/%s/android.zip',
'ubuntu24.04-arm64': 'builds/android/%s/android.zip',
'debian11-x64': 'builds/android/%s/android.zip',
'debian11-arm64': 'builds/android/%s/android.zip',
'debian12-x64': 'builds/android/%s/android.zip',

Просмотреть файл

@ -450,6 +450,217 @@ export const deps: any = {
'libevent-2.1.so.7': 'libevent-2.1-7',
},
},
'ubuntu24.04-x64': {
tools: [
'xvfb',
'fonts-noto-color-emoji',
'fonts-unifont',
'libfontconfig1',
'libfreetype6',
'xfonts-cyrillic',
'xfonts-scalable',
'fonts-liberation',
'fonts-ipafont-gothic',
'fonts-wqy-zenhei',
'fonts-tlwg-loma-otf',
'fonts-freefont-ttf',
],
chromium: [
'libasound2t64',
'libatk-bridge2.0-0t64',
'libatk1.0-0t64',
'libatspi2.0-0t64',
'libcairo2',
'libcups2t64',
'libdbus-1-3',
'libdrm2',
'libgbm1',
'libglib2.0-0t64',
'libnspr4',
'libnss3',
'libpango-1.0-0',
'libx11-6',
'libxcb1',
'libxcomposite1',
'libxdamage1',
'libxext6',
'libxfixes3',
'libxkbcommon0',
'libxrandr2'
],
firefox: [
'libasound2t64',
'libatk1.0-0t64',
'libcairo-gobject2',
'libcairo2',
'libdbus-1-3',
'libfontconfig1',
'libfreetype6',
'libgdk-pixbuf-2.0-0',
'libglib2.0-0t64',
'libgtk-3-0t64',
'libpango-1.0-0',
'libpangocairo-1.0-0',
'libx11-6',
'libx11-xcb1',
'libxcb-shm0',
'libxcb1',
'libxcomposite1',
'libxcursor1',
'libxdamage1',
'libxext6',
'libxfixes3',
'libxi6',
'libxrandr2',
'libxrender1'
],
webkit: [
'gstreamer1.0-libav',
'gstreamer1.0-plugins-bad',
'gstreamer1.0-plugins-base',
'gstreamer1.0-plugins-good',
'libatomic1',
'libatk-bridge2.0-0t64',
'libatk1.0-0t64',
'libcairo-gobject2',
'libcairo2',
'libdbus-1-3',
'libdrm2',
'libenchant-2-2',
'libepoxy0',
'libevent-2.1-7t64',
'libflite1',
'libfontconfig1',
'libfreetype6',
'libgbm1',
'libgdk-pixbuf-2.0-0',
'libgles2',
'libglib2.0-0t64',
'libgstreamer-gl1.0-0',
'libgstreamer-plugins-bad1.0-0',
'libgstreamer-plugins-base1.0-0',
'libgstreamer1.0-0',
'libgtk-3-0t64',
'libharfbuzz-icu0',
'libharfbuzz0b',
'libhyphen0',
'libicu74',
'libjpeg-turbo8',
'liblcms2-2',
'libmanette-0.2-0',
'libopus0',
'libpango-1.0-0',
'libpangocairo-1.0-0',
'libpng16-16t64',
'libsecret-1-0',
'libvpx9',
'libwayland-client0',
'libwayland-egl1',
'libwayland-server0',
'libwebp7',
'libwebpdemux2',
'libwoff1',
'libx11-6',
'libxkbcommon0',
'libxml2',
'libxslt1.1',
'libx264-164'
],
lib2package: {
'libasound.so.2': 'libasound2t64',
'libatk-1.0.so.0': 'libatk1.0-0t64',
'libatk-bridge-2.0.so.0': 'libatk-bridge2.0-0t64',
'libatomic.so.1': 'libatomic1',
'libatspi.so.0': 'libatspi2.0-0t64',
'libcairo-gobject.so.2': 'libcairo-gobject2',
'libcairo.so.2': 'libcairo2',
'libcups.so.2': 'libcups2t64',
'libdbus-1.so.3': 'libdbus-1-3',
'libdrm.so.2': 'libdrm2',
'libenchant-2.so.2': 'libenchant-2-2',
'libepoxy.so.0': 'libepoxy0',
'libevent-2.1.so.7': 'libevent-2.1-7t64',
'libflite_cmu_grapheme_lang.so.1': 'libflite1',
'libflite_cmu_grapheme_lex.so.1': 'libflite1',
'libflite_cmu_indic_lang.so.1': 'libflite1',
'libflite_cmu_indic_lex.so.1': 'libflite1',
'libflite_cmu_time_awb.so.1': 'libflite1',
'libflite_cmu_us_awb.so.1': 'libflite1',
'libflite_cmu_us_kal.so.1': 'libflite1',
'libflite_cmu_us_kal16.so.1': 'libflite1',
'libflite_cmu_us_rms.so.1': 'libflite1',
'libflite_cmu_us_slt.so.1': 'libflite1',
'libflite_cmulex.so.1': 'libflite1',
'libflite_usenglish.so.1': 'libflite1',
'libflite.so.1': 'libflite1',
'libfontconfig.so.1': 'libfontconfig1',
'libfreetype.so.6': 'libfreetype6',
'libgbm.so.1': 'libgbm1',
'libgdk_pixbuf-2.0.so.0': 'libgdk-pixbuf-2.0-0',
'libgdk-3.so.0': 'libgtk-3-0t64',
'libgio-2.0.so.0': 'libglib2.0-0t64',
'libGLESv2.so.2': 'libgles2',
'libglib-2.0.so.0': 'libglib2.0-0t64',
'libgmodule-2.0.so.0': 'libglib2.0-0t64',
'libgobject-2.0.so.0': 'libglib2.0-0t64',
'libgstallocators-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstapp-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstaudio-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstbase-1.0.so.0': 'libgstreamer1.0-0',
'libgstcodecparsers-1.0.so.0': 'libgstreamer-plugins-bad1.0-0',
'libgstfft-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstgl-1.0.so.0': 'libgstreamer-gl1.0-0',
'libgstpbutils-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstreamer-1.0.so.0': 'libgstreamer1.0-0',
'libgsttag-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgstvideo-1.0.so.0': 'libgstreamer-plugins-base1.0-0',
'libgtk-3.so.0': 'libgtk-3-0t64',
'libharfbuzz-icu.so.0': 'libharfbuzz-icu0',
'libharfbuzz.so.0': 'libharfbuzz0b',
'libhyphen.so.0': 'libhyphen0',
'libicudata.so.74': 'libicu74',
'libicui18n.so.74': 'libicu74',
'libicuuc.so.74': 'libicu74',
'libjpeg.so.8': 'libjpeg-turbo8',
'liblcms2.so.2': 'liblcms2-2',
'libmanette-0.2.so.0': 'libmanette-0.2-0',
'libnspr4.so': 'libnspr4',
'libnss3.so': 'libnss3',
'libnssutil3.so': 'libnss3',
'libopus.so.0': 'libopus0',
'libpango-1.0.so.0': 'libpango-1.0-0',
'libpangocairo-1.0.so.0': 'libpangocairo-1.0-0',
'libpng16.so.16': 'libpng16-16t64',
'libsecret-1.so.0': 'libsecret-1-0',
'libsmime3.so': 'libnss3',
'libsoup-3.0.so.0': 'libsoup-3.0-0',
'libvpx.so.9': 'libvpx9',
'libwayland-client.so.0': 'libwayland-client0',
'libwayland-egl.so.1': 'libwayland-egl1',
'libwayland-server.so.0': 'libwayland-server0',
'libwebp.so.7': 'libwebp7',
'libwebpdemux.so.2': 'libwebpdemux2',
'libwoff2dec.so.1.0.2': 'libwoff1',
'libX11-xcb.so.1': 'libx11-xcb1',
'libX11.so.6': 'libx11-6',
'libxcb-shm.so.0': 'libxcb-shm0',
'libxcb.so.1': 'libxcb1',
'libXcomposite.so.1': 'libxcomposite1',
'libXcursor.so.1': 'libxcursor1',
'libXdamage.so.1': 'libxdamage1',
'libXext.so.6': 'libxext6',
'libXfixes.so.3': 'libxfixes3',
'libXi.so.6': 'libxi6',
'libxkbcommon.so.0': 'libxkbcommon0',
'libxml2.so.2': 'libxml2',
'libXrandr.so.2': 'libxrandr2',
'libXrender.so.1': 'libxrender1',
'libxslt.so.1': 'libxslt1.1',
'libx264.so': 'libx264-164',
},
},
'debian11-x64': {
tools: [
'xvfb',
@ -842,6 +1053,20 @@ deps['ubuntu22.04-arm64'] = {
},
};
deps['ubuntu24.04-arm64'] = {
tools: [...deps['ubuntu24.04-x64'].tools],
chromium: [...deps['ubuntu24.04-x64'].chromium],
firefox: [
...deps['ubuntu24.04-x64'].firefox,
],
webkit: [
...deps['ubuntu24.04-x64'].webkit,
],
lib2package: {
...deps['ubuntu24.04-x64'].lib2package,
},
};
deps['debian11-arm64'] = {
tools: [...deps['debian11-x64'].tools],
chromium: [...deps['debian11-x64'].chromium],

Просмотреть файл

@ -28,6 +28,7 @@ export type HostPlatform = 'win64' |
'ubuntu18.04-x64' | 'ubuntu18.04-arm64' |
'ubuntu20.04-x64' | 'ubuntu20.04-arm64' |
'ubuntu22.04-x64' | 'ubuntu22.04-arm64' |
'ubuntu24.04-x64' | 'ubuntu24.04-arm64' |
'debian11-x64' | 'debian11-arm64' |
'debian12-x64' | 'debian12-arm64' |
'<unknown>';
@ -71,7 +72,9 @@ function calculatePlatform(): { hostPlatform: HostPlatform, isOfficiallySupporte
return { hostPlatform: ('ubuntu18.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform: false };
if (parseInt(distroInfo.version, 10) <= 21)
return { hostPlatform: ('ubuntu20.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform };
return { hostPlatform: ('ubuntu22.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform };
if (parseInt(distroInfo.version, 10) <= 22)
return { hostPlatform: ('ubuntu22.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform };
return { hostPlatform: ('ubuntu24.04' + archSuffix) as HostPlatform, isOfficiallySupportedPlatform };
}
// Linux Mint is ubuntu-based but does not have the same versions
if (distroInfo?.id === 'linuxmint') {

Просмотреть файл

@ -0,0 +1,49 @@
FROM ubuntu:noble
ARG DEBIAN_FRONTEND=noninteractive
ARG TZ=America/Los_Angeles
ARG DOCKER_IMAGE_NAME_TEMPLATE="mcr.microsoft.com/playwright:v%version%-jammy"
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
# === INSTALL Node.js ===
RUN apt-get update && \
# Install Node.js
apt-get install -y curl wget gpg ca-certificates && \
mkdir -p /etc/apt/keyrings && \
curl -sL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" >> /etc/apt/sources.list.d/nodesource.list && \
apt-get update && \
apt-get install -y nodejs && \
# Feature-parity with node.js base images.
apt-get install -y --no-install-recommends git openssh-client && \
npm install -g yarn && \
# clean apt cache
rm -rf /var/lib/apt/lists/* && \
# Create the pwuser
adduser pwuser
# === BAKE BROWSERS INTO IMAGE ===
ENV PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
# 1. Add tip-of-tree Playwright package to install its browsers.
# The package should be built beforehand from tip-of-tree Playwright.
COPY ./playwright-core.tar.gz /tmp/playwright-core.tar.gz
# 2. Bake in browsers & deps.
# Browsers will be downloaded in `/ms-playwright`.
# Note: make sure to set 777 to the registry so that any user can access
# registry.
RUN mkdir /ms-playwright && \
mkdir /ms-playwright-agent && \
cd /ms-playwright-agent && npm init -y && \
npm i /tmp/playwright-core.tar.gz && \
npm exec --no -- playwright-core mark-docker-image "${DOCKER_IMAGE_NAME_TEMPLATE}" && \
npm exec --no -- playwright-core install --with-deps && rm -rf /var/lib/apt/lists/* && \
rm /tmp/playwright-core.tar.gz && \
rm -rf /ms-playwright-agent && \
rm -rf ~/.npm/ && \
chmod -R 777 /ms-playwright

Просмотреть файл

@ -26,6 +26,7 @@ else
exit 1
fi
# Ubuntu 20.04
FOCAL_TAGS=(
"next"
"next-focal"
@ -36,6 +37,7 @@ if [[ "$RELEASE_CHANNEL" == "stable" ]]; then
FOCAL_TAGS+=("focal")
fi
# Ubuntu 22.04
JAMMY_TAGS=(
"next-jammy"
"v${PW_VERSION}-jammy"
@ -47,6 +49,15 @@ if [[ "$RELEASE_CHANNEL" == "stable" ]]; then
JAMMY_TAGS+=("jammy")
fi
NOBLE_TAGS=(
"next-noble"
"v${PW_VERSION}-noble"
)
if [[ "$RELEASE_CHANNEL" == "stable" ]]; then
NOBLE_TAGS+=("noble")
fi
tag_and_push() {
local source="$1"
local target="$2"
@ -83,8 +94,10 @@ publish_docker_images_with_arch_suffix() {
TAGS=("${FOCAL_TAGS[@]}")
elif [[ "$FLAVOR" == "jammy" ]]; then
TAGS=("${JAMMY_TAGS[@]}")
elif [[ "$FLAVOR" == "noble" ]]; then
TAGS=("${NOBLE_TAGS[@]}")
else
echo "ERROR: unknown flavor - $FLAVOR. Must be either 'focal' or 'jammy'"
echo "ERROR: unknown flavor - $FLAVOR. Must be either 'focal', 'jammy', or 'noble'"
exit 1
fi
local ARCH="$2"
@ -109,8 +122,10 @@ publish_docker_manifest () {
TAGS=("${FOCAL_TAGS[@]}")
elif [[ "$FLAVOR" == "jammy" ]]; then
TAGS=("${JAMMY_TAGS[@]}")
elif [[ "$FLAVOR" == "noble" ]]; then
TAGS=("${NOBLE_TAGS[@]}")
else
echo "ERROR: unknown flavor - $FLAVOR. Must be either 'focal' or 'jammy'"
echo "ERROR: unknown flavor - $FLAVOR. Must be either 'focal', 'jammy', or 'noble'"
exit 1
fi
@ -129,11 +144,17 @@ publish_docker_manifest () {
done
}
# Ubuntu 20.04
publish_docker_images_with_arch_suffix focal amd64
publish_docker_images_with_arch_suffix focal arm64
publish_docker_manifest focal amd64 arm64
# Ubuntu 22.04
publish_docker_images_with_arch_suffix jammy amd64
publish_docker_images_with_arch_suffix jammy arm64
publish_docker_manifest jammy amd64 arm64
# Ubuntu 24.04
publish_docker_images_with_arch_suffix noble amd64
publish_docker_images_with_arch_suffix noble arm64
publish_docker_manifest noble amd64 arm64

2
utils/linux-browser-dependencies/.gitignore поставляемый
Просмотреть файл

@ -1,2 +1,2 @@
RUN_RESULT
playwright.tar.gz
playwright-core.tar.gz