docs: recommend Ubuntu 24.04 in Docker images (#31435)
This commit is contained in:
Родитель
0d575b4ef6
Коммит
cae779b74f
|
@ -2,12 +2,6 @@ name: "publish release - Docker"
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
is_release:
|
||||
required: true
|
||||
type: boolean
|
||||
description: "Is this a release image?"
|
||||
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
|
@ -45,6 +39,3 @@ jobs:
|
|||
- name: Login to ACR via OIDC
|
||||
run: az acr login --name playwright
|
||||
- run: ./utils/docker/publish_docker.sh stable
|
||||
if: (github.event_name != 'workflow_dispatch' && !github.event.release.prerelease) || (github.event_name == 'workflow_dispatch' && github.event.inputs.is_release == 'true')
|
||||
- run: ./utils/docker/publish_docker.sh canary
|
||||
if: (github.event_name != 'workflow_dispatch' && github.event.release.prerelease) || (github.event_name == 'workflow_dispatch' && github.event.inputs.is_release != 'true')
|
||||
|
|
|
@ -296,7 +296,7 @@ trigger:
|
|||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
container: mcr.microsoft.com/playwright:v%%VERSION%%-jammy
|
||||
container: mcr.microsoft.com/playwright:v%%VERSION%%-noble
|
||||
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
|
@ -318,7 +318,7 @@ trigger:
|
|||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
container: mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy
|
||||
container: mcr.microsoft.com/playwright/python:v%%VERSION%%-noble
|
||||
|
||||
steps:
|
||||
- task: UsePythonVersion@0
|
||||
|
@ -340,7 +340,7 @@ trigger:
|
|||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
container: mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy
|
||||
container: mcr.microsoft.com/playwright/java:v%%VERSION%%-noble
|
||||
|
||||
steps:
|
||||
- task: JavaToolInstaller@0
|
||||
|
@ -361,7 +361,7 @@ trigger:
|
|||
|
||||
pool:
|
||||
vmImage: ubuntu-latest
|
||||
container: mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy
|
||||
container: mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble
|
||||
|
||||
steps:
|
||||
- task: UseDotNet@2
|
||||
|
@ -384,28 +384,28 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
|
|||
executors:
|
||||
pw-jammy-development:
|
||||
docker:
|
||||
- image: mcr.microsoft.com/playwright:v%%VERSION%%-jammy
|
||||
- image: mcr.microsoft.com/playwright:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
```yml python
|
||||
executors:
|
||||
pw-jammy-development:
|
||||
docker:
|
||||
- image: mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy
|
||||
- image: mcr.microsoft.com/playwright/python:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
```yml java
|
||||
executors:
|
||||
pw-jammy-development:
|
||||
docker:
|
||||
- image: mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy
|
||||
- image: mcr.microsoft.com/playwright/java:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
```yml csharp
|
||||
executors:
|
||||
pw-jammy-development:
|
||||
docker:
|
||||
- image: mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy
|
||||
- image: mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures.
|
||||
|
@ -430,7 +430,7 @@ to run tests on Jenkins.
|
|||
|
||||
```groovy js
|
||||
pipeline {
|
||||
agent { docker { image 'mcr.microsoft.com/playwright:v%%VERSION%%-jammy' } }
|
||||
agent { docker { image 'mcr.microsoft.com/playwright:v%%VERSION%%-noble' } }
|
||||
stages {
|
||||
stage('e2e-tests') {
|
||||
steps {
|
||||
|
@ -444,7 +444,7 @@ pipeline {
|
|||
|
||||
```groovy python
|
||||
pipeline {
|
||||
agent { docker { image 'mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy' } }
|
||||
agent { docker { image 'mcr.microsoft.com/playwright/python:v%%VERSION%%-noble' } }
|
||||
stages {
|
||||
stage('e2e-tests') {
|
||||
steps {
|
||||
|
@ -458,7 +458,7 @@ pipeline {
|
|||
|
||||
```groovy java
|
||||
pipeline {
|
||||
agent { docker { image 'mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy' } }
|
||||
agent { docker { image 'mcr.microsoft.com/playwright/java:v%%VERSION%%-noble' } }
|
||||
stages {
|
||||
stage('e2e-tests') {
|
||||
steps {
|
||||
|
@ -472,7 +472,7 @@ pipeline {
|
|||
|
||||
```groovy csharp
|
||||
pipeline {
|
||||
agent { docker { image 'mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy' } }
|
||||
agent { docker { image 'mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble' } }
|
||||
stages {
|
||||
stage('e2e-tests') {
|
||||
steps {
|
||||
|
@ -489,19 +489,19 @@ pipeline {
|
|||
Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.md)).
|
||||
|
||||
```yml js
|
||||
image: mcr.microsoft.com/playwright:v%%VERSION%%-jammy
|
||||
image: mcr.microsoft.com/playwright:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
```yml python
|
||||
image: mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy
|
||||
image: mcr.microsoft.com/playwright/python:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
```yml java
|
||||
image: mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy
|
||||
image: mcr.microsoft.com/playwright/java:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
```yml csharp
|
||||
image: mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy
|
||||
image: mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
### GitLab CI
|
||||
|
@ -514,7 +514,7 @@ stages:
|
|||
|
||||
tests:
|
||||
stage: test
|
||||
image: mcr.microsoft.com/playwright:v%%VERSION%%-jammy
|
||||
image: mcr.microsoft.com/playwright:v%%VERSION%%-noble
|
||||
script:
|
||||
...
|
||||
```
|
||||
|
@ -525,7 +525,7 @@ stages:
|
|||
|
||||
tests:
|
||||
stage: test
|
||||
image: mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy
|
||||
image: mcr.microsoft.com/playwright/python:v%%VERSION%%-noble
|
||||
script:
|
||||
...
|
||||
```
|
||||
|
@ -536,7 +536,7 @@ stages:
|
|||
|
||||
tests:
|
||||
stage: test
|
||||
image: mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy
|
||||
image: mcr.microsoft.com/playwright/java:v%%VERSION%%-noble
|
||||
script:
|
||||
...
|
||||
```
|
||||
|
@ -547,7 +547,7 @@ stages:
|
|||
|
||||
tests:
|
||||
stage: test
|
||||
image: mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy
|
||||
image: mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble
|
||||
script:
|
||||
...
|
||||
```
|
||||
|
@ -563,7 +563,7 @@ stages:
|
|||
|
||||
tests:
|
||||
stage: test
|
||||
image: mcr.microsoft.com/playwright:v%%VERSION%%-jammy
|
||||
image: mcr.microsoft.com/playwright:v%%VERSION%%-noble
|
||||
parallel: 7
|
||||
script:
|
||||
- npm ci
|
||||
|
@ -578,7 +578,7 @@ stages:
|
|||
|
||||
tests:
|
||||
stage: test
|
||||
image: mcr.microsoft.com/playwright:v%%VERSION%%-jammy
|
||||
image: mcr.microsoft.com/playwright:v%%VERSION%%-noble
|
||||
parallel:
|
||||
matrix:
|
||||
- PROJECT: ['chromium', 'webkit']
|
||||
|
@ -594,7 +594,7 @@ To run Playwright tests on Google Cloud Build, use our public Docker image ([see
|
|||
|
||||
```yml
|
||||
steps:
|
||||
- name: mcr.microsoft.com/playwright:v%%VERSION%%-jammy
|
||||
- name: mcr.microsoft.com/playwright:v%%VERSION%%-noble
|
||||
script:
|
||||
...
|
||||
env:
|
||||
|
|
|
@ -18,19 +18,19 @@ This Docker image is intended to be used for testing and development purposes on
|
|||
### Pull the image
|
||||
|
||||
```bash js
|
||||
docker pull mcr.microsoft.com/playwright:v%%VERSION%%-jammy
|
||||
docker pull mcr.microsoft.com/playwright:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
```bash python
|
||||
docker pull mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy
|
||||
docker pull mcr.microsoft.com/playwright/python:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
```bash csharp
|
||||
docker pull mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy
|
||||
docker pull mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
```bash java
|
||||
docker pull mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy
|
||||
docker pull mcr.microsoft.com/playwright/java:v%%VERSION%%-noble
|
||||
```
|
||||
|
||||
### 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.
|
||||
|
||||
```bash js
|
||||
docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v%%VERSION%%-jammy /bin/bash
|
||||
docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v%%VERSION%%-noble /bin/bash
|
||||
```
|
||||
|
||||
```bash python
|
||||
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy /bin/bash
|
||||
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v%%VERSION%%-noble /bin/bash
|
||||
```
|
||||
|
||||
```bash csharp
|
||||
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy /bin/bash
|
||||
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble /bin/bash
|
||||
```
|
||||
|
||||
```bash java
|
||||
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy /bin/bash
|
||||
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v%%VERSION%%-noble /bin/bash
|
||||
```
|
||||
|
||||
#### Crawling and scraping
|
||||
|
@ -62,19 +62,19 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v%%VERSION%%-ja
|
|||
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
|
||||
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v%%VERSION%%-jammy /bin/bash
|
||||
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v%%VERSION%%-noble /bin/bash
|
||||
```
|
||||
|
||||
```bash python
|
||||
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/python:v%%VERSION%%-jammy /bin/bash
|
||||
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/python:v%%VERSION%%-noble /bin/bash
|
||||
```
|
||||
|
||||
```bash csharp
|
||||
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-jammy /bin/bash
|
||||
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v%%VERSION%%-noble /bin/bash
|
||||
```
|
||||
|
||||
```bash java
|
||||
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v%%VERSION%%-jammy /bin/bash
|
||||
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v%%VERSION%%-noble /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:
|
||||
|
@ -108,9 +108,7 @@ See our [Continuous Integration guides](./ci.md) for sample configs.
|
|||
See [all available image tags].
|
||||
|
||||
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%%` - Playwright v%%VERSION%% release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
|
||||
- `: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).
|
||||
|
|
|
@ -15,11 +15,6 @@ if [[ "${RELEASE_CHANNEL}" == "stable" ]]; then
|
|||
echo "ERROR: cannot publish stable docker with Playwright version '${PW_VERSION}'"
|
||||
exit 1
|
||||
fi
|
||||
elif [[ "${RELEASE_CHANNEL}" == "canary" ]]; then
|
||||
if [[ "${PW_VERSION}" != *-* ]]; then
|
||||
echo "ERROR: cannot publish canary docker with Playwright version '${PW_VERSION}'"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "ERROR: unknown release channel - ${RELEASE_CHANNEL}"
|
||||
echo "Must be either 'stable' or 'canary'"
|
||||
|
@ -28,36 +23,20 @@ fi
|
|||
|
||||
# Ubuntu 20.04
|
||||
FOCAL_TAGS=(
|
||||
"next"
|
||||
"next-focal"
|
||||
"v${PW_VERSION}-focal"
|
||||
)
|
||||
|
||||
if [[ "$RELEASE_CHANNEL" == "stable" ]]; then
|
||||
FOCAL_TAGS+=("focal")
|
||||
fi
|
||||
|
||||
# Ubuntu 22.04
|
||||
JAMMY_TAGS=(
|
||||
"next-jammy"
|
||||
"v${PW_VERSION}-jammy"
|
||||
"v${PW_VERSION}"
|
||||
)
|
||||
|
||||
if [[ "$RELEASE_CHANNEL" == "stable" ]]; then
|
||||
JAMMY_TAGS+=("latest")
|
||||
JAMMY_TAGS+=("jammy")
|
||||
fi
|
||||
|
||||
# Ubuntu 24.04
|
||||
NOBLE_TAGS=(
|
||||
"next-noble"
|
||||
"v${PW_VERSION}"
|
||||
"v${PW_VERSION}-noble"
|
||||
)
|
||||
|
||||
if [[ "$RELEASE_CHANNEL" == "stable" ]]; then
|
||||
NOBLE_TAGS+=("noble")
|
||||
fi
|
||||
|
||||
tag_and_push() {
|
||||
local source="$1"
|
||||
local target="$2"
|
||||
|
|
Загрузка…
Ссылка в новой задаче