This commit is contained in:
Max Schmitt 2024-06-03 09:56:09 +02:00
parent 6b7a89a35a
commit a82945b2c5
6 changed files with 20 additions and 21 deletions

View file

@ -18,19 +18,19 @@ This Docker image is intended to be used for testing and development purposes on
### Pull the image ### Pull the image
```bash js ```bash js
docker pull mcr.microsoft.com/playwright:v%%VERSION%%-noble docker pull mcr.microsoft.com/playwright:v%%VERSION%%-jammy
``` ```
```bash python ```bash python
docker pull mcr.microsoft.com/playwright/python:v%%VERSION%%-noble docker pull mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy
``` ```
```bash csharp ```bash csharp
docker pull mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble docker pull mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy
``` ```
```bash java ```bash java
docker pull mcr.microsoft.com/playwright/java:v%%VERSION%%-noble docker pull mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy
``` ```
### Run the image ### Run the image
@ -42,19 +42,19 @@ By default, the Docker image will use the `root` user to run the browsers. This
On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers. On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers.
```bash js ```bash js
docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v%%VERSION%%-noble /bin/bash docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v%%VERSION%%-jammy /bin/bash
``` ```
```bash python ```bash python
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v%%VERSION%%-noble /bin/bash docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy /bin/bash
``` ```
```bash csharp ```bash csharp
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble /bin/bash docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy /bin/bash
``` ```
```bash java ```bash java
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v%%VERSION%%-noble /bin/bash docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy /bin/bash
``` ```
#### Crawling and scraping #### Crawling and scraping
@ -62,19 +62,19 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v%%VERSION%%-no
On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it. On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it.
```bash js ```bash js
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v%%VERSION%%-noble /bin/bash docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v%%VERSION%%-jammy /bin/bash
``` ```
```bash python ```bash python
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/python:v%%VERSION%%-noble /bin/bash docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy /bin/bash
``` ```
```bash csharp ```bash csharp
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble /bin/bash docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy /bin/bash
``` ```
```bash java ```bash java
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v%%VERSION%%-noble /bin/bash docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy /bin/bash
``` ```
[`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions: [`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions:

View file

@ -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. - 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). - Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma. - MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04 - (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 ## What's next

View file

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

View file

@ -289,7 +289,7 @@ pnpm exec playwright --version
- Node.js 18+ - Node.js 18+
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL). - Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma. - MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04 - (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 ## What's next

View file

@ -102,7 +102,7 @@ pip install pytest-playwright playwright -U
- Python 3.8 or higher. - Python 3.8 or higher.
- Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL). - Windows 10+, Windows Server 2016+ or Windows Subsystem for Linux (WSL).
- MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma. - MacOS 12 Monterey, MacOS 13 Ventura, or MacOS 14 Sonoma.
- Debian 11, Debian 12, Ubuntu 20.04 or Ubuntu 22.04, Ubuntu 24.04 - (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 ## What's next

View file

@ -516,6 +516,10 @@ export const deps: any = {
'libxrender1' 'libxrender1'
], ],
webkit: [ webkit: [
'gstreamer1.0-libav',
'gstreamer1.0-plugins-bad',
'gstreamer1.0-plugins-base',
'gstreamer1.0-plugins-good',
'libatomic1', 'libatomic1',
'libatk-bridge2.0-0t64', 'libatk-bridge2.0-0t64',
'libatk1.0-0t64', 'libatk1.0-0t64',
@ -542,7 +546,6 @@ export const deps: any = {
'libharfbuzz0b', 'libharfbuzz0b',
'libhyphen0', 'libhyphen0',
'libicu74', 'libicu74',
'libjavascriptcoregtk-4.1-0',
'libjpeg-turbo8', 'libjpeg-turbo8',
'liblcms2-2', 'liblcms2-2',
'libmanette-0.2-0', 'libmanette-0.2-0',
@ -551,12 +554,10 @@ export const deps: any = {
'libpangocairo-1.0-0', 'libpangocairo-1.0-0',
'libpng16-16t64', 'libpng16-16t64',
'libsecret-1-0', 'libsecret-1-0',
'libsoup-3.0-0',
'libvpx9', 'libvpx9',
'libwayland-client0', 'libwayland-client0',
'libwayland-egl1', 'libwayland-egl1',
'libwayland-server0', 'libwayland-server0',
'libwebkit2gtk-4.1-0',
'libwebp7', 'libwebp7',
'libwebpdemux2', 'libwebpdemux2',
'libwoff1', 'libwoff1',
@ -621,7 +622,6 @@ export const deps: any = {
'libicudata.so.74': 'libicu74', 'libicudata.so.74': 'libicu74',
'libicui18n.so.74': 'libicu74', 'libicui18n.so.74': 'libicu74',
'libicuuc.so.74': 'libicu74', 'libicuuc.so.74': 'libicu74',
'libjavascriptcoregtk-4.1.so.0': 'libjavascriptcoregtk-4.1-0',
'libjpeg.so.8': 'libjpeg-turbo8', 'libjpeg.so.8': 'libjpeg-turbo8',
'liblcms2.so.2': 'liblcms2-2', 'liblcms2.so.2': 'liblcms2-2',
'libmanette-0.2.so.0': 'libmanette-0.2-0', 'libmanette-0.2.so.0': 'libmanette-0.2-0',
@ -639,7 +639,6 @@ export const deps: any = {
'libwayland-client.so.0': 'libwayland-client0', 'libwayland-client.so.0': 'libwayland-client0',
'libwayland-egl.so.1': 'libwayland-egl1', 'libwayland-egl.so.1': 'libwayland-egl1',
'libwayland-server.so.0': 'libwayland-server0', 'libwayland-server.so.0': 'libwayland-server0',
'libwebkit2gtk-4.1.so.0': 'libwebkit2gtk-4.1-0',
'libwebp.so.7': 'libwebp7', 'libwebp.so.7': 'libwebp7',
'libwebpdemux.so.2': 'libwebpdemux2', 'libwebpdemux.so.2': 'libwebpdemux2',
'libwoff2dec.so.1.0.2': 'libwoff1', 'libwoff2dec.so.1.0.2': 'libwoff1',