Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

devops: stop publishing Ubuntu 20.04 (#33203)

Max Schmitte866e3306ee7
diff --git a/docs/src/docker.md b/docs/src/docker.md
index 665904a144..bfcf5e73b5 100644
--- a/docs/src/docker.md
+++ b/docs/src/docker.md
@@ -5,7 +5,7 @@ title: "Docker"
## Introduction
-[Dockerfile.jammy] can be used to run Playwright scripts in Docker environment. This image includes the [Playwright browsers](./browsers.md#install-browsers) and [browser system dependencies](./browsers.md#install-system-dependencies). The Playwright package/dependency is not included in the image and should be installed separately.
+[Dockerfile.noble] can be used to run Playwright scripts in Docker environment. This image includes the [Playwright browsers](./browsers.md#install-browsers) and [browser system dependencies](./browsers.md#install-system-dependencies). The Playwright package/dependency is not included in the image and should be installed separately.
## Usage
@@ -111,7 +111,6 @@ We currently publish images with the following tags:
- `: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).
:::note
It is recommended to always pin your Docker image to a specific version if possible. If the Playwright version in your Docker image does not match the version in your project/tests, Playwright will be unable to locate browser executables.
@@ -122,7 +121,6 @@ It is recommended to always pin your Docker image to a specific version if possi
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`
#### Alpine
diff --git a/utils/docker/Dockerfile.focal b/utils/docker/Dockerfile.focal
deleted file mode 100644
index cd1d1d7c6e..0000000000
--- a/utils/docker/Dockerfile.focal
+++ /dev/null
@@ -1,51 +0,0 @@
-FROM ubuntu:focal
-
-ARG DEBIAN_FRONTEND=noninteractive
-ARG TZ=America/Los_Angeles
-ARG DOCKER_IMAGE_NAME_TEMPLATE="mcr.microsoft.com/playwright:v%version%-focal"
-
-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 Playwright Agent.
-# Playwright Agent is used to bake in browsers and browser dependencies,
-# and run docker server later on.
-# 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
diff --git a/utils/docker/build.sh b/utils/docker/build.sh
index 46e8d9e6b6..280727eac5 100755
--- a/utils/docker/build.sh
+++ b/utils/docker/build.sh
@@ -3,12 +3,12 @@ set -e
set +x
if [[ ($1 == '--help') || ($1 == '-h') || ($1 == '') || ($2 == '') ]]; then
- echo "usage: $(basename $0) {--arm64,--amd64} {focal,jammy} playwright:localbuild-focal"
+ echo "usage: $(basename $0) {--arm64,--amd64} {jammy,noble} playwright:localbuild-noble"
echo
- echo "Build Playwright docker image and tag it as 'playwright:localbuild-focal'."
+ echo "Build Playwright docker image and tag it as 'playwright:localbuild-noble'."
echo "Once image is built, you can run it with"
echo ""
- echo " docker run --rm -it playwright:localbuild-focal /bin/bash"
+ echo " docker run --rm -it playwright:localbuild-noble /bin/bash"
echo ""
echo "NOTE: this requires on Playwright dependencies to be installed with 'npm install'"
echo " and Playwright itself being built with 'npm run build'"
diff --git a/utils/docker/publish_docker.sh b/utils/docker/publish_docker.sh
index a4892024a8..870da29a90 100755
--- a/utils/docker/publish_docker.sh
+++ b/utils/docker/publish_docker.sh
@@ -21,11 +21,6 @@ else
exit 1
fi
-# Ubuntu 20.04
-FOCAL_TAGS=(
- "v${PW_VERSION}-focal"
-)
-
# Ubuntu 22.04
JAMMY_TAGS=(
"v${PW_VERSION}-jammy"
@@ -69,14 +64,12 @@ install_oras_if_needed() {
publish_docker_images_with_arch_suffix() {
local FLAVOR="$1"
local TAGS=()
- if [[ "$FLAVOR" == "focal" ]]; then
- TAGS=("${FOCAL_TAGS[@]}")
- elif [[ "$FLAVOR" == "jammy" ]]; then
+ if [[ "$FLAVOR" == "jammy" ]]; then
TAGS=("${JAMMY_TAGS[@]}")
elif [[ "$FLAVOR" == "noble" ]]; then
TAGS=("${NOBLE_TAGS[@]}")
else
- echo "ERROR: unknown flavor - $FLAVOR. Must be either 'focal', 'jammy', or 'noble'"
+ echo "ERROR: unknown flavor - $FLAVOR. Must be either 'jammy', or 'noble'"
exit 1
fi
local ARCH="$2"
@@ -97,14 +90,12 @@ publish_docker_images_with_arch_suffix() {
publish_docker_manifest () {
local FLAVOR="$1"
local TAGS=()
- if [[ "$FLAVOR" == "focal" ]]; then
- TAGS=("${FOCAL_TAGS[@]}")
- elif [[ "$FLAVOR" == "jammy" ]]; then
+ if [[ "$FLAVOR" == "jammy" ]]; then
TAGS=("${JAMMY_TAGS[@]}")
elif [[ "$FLAVOR" == "noble" ]]; then
TAGS=("${NOBLE_TAGS[@]}")
else
- echo "ERROR: unknown flavor - $FLAVOR. Must be either 'focal', 'jammy', or 'noble'"
+ echo "ERROR: unknown flavor - $FLAVOR. Must be either 'jammy', or 'noble'"
exit 1
fi
@@ -123,11 +114,6 @@ 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