67 Commits

Author SHA1 Message Date
Copilot b5b5b5f142 feat(docker): install zstd in Ubuntu images (#42616) 2026-09-08 10:49:33 -07:00
Dmitry Gozman 615e1c7844 devops: move docker publishing to AzDO (#41724) 2026-07-10 19:00:23 +01:00
Dmitry Gozman 9e613269e3 devops(docker): add Azure DevOps pipeline for Docker release publishing (#41429) 2026-06-30 14:11:06 +01:00
Kevin Turcios 4b6f031351 devops(docker): split browser layers and use zstd compression for faster pulls (#41232) 2026-06-26 11:36:06 +01:00
Yury Semikhatsky 2b418d6d9a feat(docker): add Ubuntu 26.04 (Resolute Raccoon) image (#41290) 2026-06-15 10:00:27 -07:00
Dmitry Gozman 67930e8ffc Revert "devops(docker): split browser layers and use zstd compression for faster pulls (#40702)" (#41081) 2026-06-01 23:42:32 +01:00
Kevin Turcios 5adbc68a33 devops(docker): split browser layers and use zstd compression for faster pulls (#40702) 2026-05-14 10:17:16 -07:00
microsoft-playwright-automation[bot] 20e2d63f18 chore: roll driver/Dockerfile to recent Node.js LTS version (#38175)
Co-authored-by: microsoft-playwright-automation[bot] <203992400+microsoft-playwright-automation[bot]@users.noreply.github.com>
2025-11-11 06:36:53 -08:00
Adam Gastineau 8c3be44af2 chore(ci): automatically update Docker to latest NodeJS LTS (#38163) 2025-11-11 05:45:40 -08:00
Max Schmitt 3b1883444d chore: bump Docker Node.js to 22 (#33348) 2024-10-29 21:04:13 +01:00
Max Schmitt e866e3306e devops: stop publishing Ubuntu 20.04 (#33203) 2024-10-21 17:00:10 +02:00
Lars Hanisch 183720b56a fix(docker): correct Ubuntu Noble name in name template (#33133) 2024-10-16 10:15:40 +02:00
Max Schmitt cae779b74f docs: recommend Ubuntu 24.04 in Docker images (#31435) 2024-08-12 16:39:56 +02:00
Max Schmitt 2c6fd722dd feat: support Ubuntu 24.04 (#30826) 2024-06-03 12:47:16 +02:00
Max Schmitt 108b250d86 fix(docker): set default shell encoding (#30288)
This seems to be common practise, as per
[here](https://github.com/search?q=org%3Amicrosoft%20%2FENV%20LANG%3DC.UTF-8%2F&type=code).

Fixes https://github.com/microsoft/playwright/issues/30245
Fixes https://github.com/microsoft/playwright/issues/28642
2024-04-09 09:14:35 +02:00
Max Schmitt 40b8bcb6ad devops: mark Docker images as EOL (#29847)
As per https://github.com/microsoft/playwright-dotnet/pull/2879.
2024-03-07 20:18:24 +01:00
Max Schmitt abd8502490 devops: do not publish sha-X Docker images (#29433) 2024-02-09 09:07:10 -08:00
Max Schmitt 6d3913f459 chore: fix Ubuntu 22.04 WebKit on 20.04 host (#28068)
https://github.com/microsoft/playwright/issues/27313
2023-11-09 21:59:28 +01:00
Max Schmitt 841bb92049 chore: update Docker Node.js version to new LTS (20) (#27813)
Node.js 20 was promoted to LTS on 2023-10-24.

Fixes https://github.com/microsoft/playwright/issues/27812
2023-10-26 09:45:54 -07:00
Max Schmitt 4b771f9d4b chore: remove /ms-playwright-agent in focal Docker image (#27631)
This was missing in focal but was there in Jammy.


https://github.com/microsoft/playwright/blob/6b31b30df9edc4c0b64a89ed5c29222ee4dea5a0/utils/docker/Dockerfile.jammy#L44
2023-10-16 18:17:21 +02:00
Yury Semikhatsky c751bf135e devops: stop using deprecated method of installing node (#27392)
Otherwise we see a warning for 1 minute every time during the script
run:

<img width="616" alt="image"
src="https://github.com/microsoft/playwright/assets/9798949/4593048c-a901-4db5-a15e-1b6dd1970625">


The instructions are taken from
https://github.com/nodesource/distributions#debian-and-ubuntu-based-distributions
2023-10-02 14:24:58 -07:00
Max Schmitt 466088215e chore: clear NPM cache of Docker image (#27000) 2023-09-12 08:14:45 +02:00
Ivo Berger f219f9fd41 devops: fix tags on jammy stable images (#26834) 2023-09-03 09:57:09 +02:00
Patrick Shaw 6e78dcb7dc fix: Allow portable bash paths for systems including NixOS (#23889)
Although very common, bash is not guaranteed to be located at
`/bin/bash`. NixOS is an example of this.

More commonly, `/bin/bash` can be quite out of date. An example of this
is MacOS's version of `bash`. This realistically won't affect Playwright
but it's worth noting. You can technically update MacOS's system version
of bash but you need elevated permissions to do so.

By using `/usr/bin/env bash` instead of `/bin/bash` we can execute
Playwright's bash scripts in like NixOS and generally improve the
selection behaviour for bash in other systems too.

Some discussion of why it's worth favouring `/usr/bin/env bash` over
`/bin/bash`:
- Discusses `/bin/bash` missing in NixOS:
https://discourse.nixos.org/t/add-bin-bash-to-avoid-unnecessary-pain/5673
- Some general commentary on why `/usr/bin/env bash` is favoured:
https://askubuntu.com/a/1402721
- Points out how old bash is in MacOS:
https://itnext.io/upgrading-bash-on-macos-7138bd1066ba

Improves situation at #5501
2023-07-03 06:27:06 -07:00
Pavel Feldman 64dde29788 chore: move to npx playwright-core install when using core (#23260) 2023-05-24 12:16:59 -07:00
Andrey Lushnikov 8ebe4dc81a devops: do not use NPX during docker container build (#23213)
The postmortem of the broken docker image:
- We use `playwright-core` package when bootstrapping our docker
container.
- Due to accidental removal of `bin` entry in the `playwright-core` (see
  https://github.com/microsoft/playwright/issues/23206), the `npx
  playwright install --with-deps` was using the last published
  Playwright version instead of a locally-built playwright binary

This patch starts using `npx exec --no` to make sure that we never call
remote commands during docker image build.
2023-05-22 19:21:09 -07:00
Max Schmitt 336d2114c8 chore: have Ubuntu 22 Docker image by default (#22356)
Fixes https://github.com/microsoft/playwright-python/issues/1858
2023-04-12 19:40:23 +02:00
Andrey Lushnikov bcb2d67c5d chore: remove experimental dockerfile.remote (#20790)
We didn't find a compelling-enough use case to release this.
2023-02-09 12:18:02 -08:00
Andrey Lushnikov b67cef2c4d feat: introduce Dockerfile.remote image (#20691)
When this image is launched, it exposes a single endpoint
that can be used to connect to and to launch browsers.
2023-02-07 10:50:44 -08:00
Andrey Lushnikov 0a752f3fd6 chore(docker): remove experimental docker integration (#20676)
This removes everything related to docker integration experiments that
we conducted over the last 6 months.

I'll send a follow-up with an alternative suggestion that was demo'ed on
a team meeting in the end of December.
2023-02-06 10:50:45 -08:00
Martijn Cornips 5dd2b1ef0c chore: update node version comment in dockerfile (#20496) 2023-02-02 16:44:20 -08:00
Max Schmitt c6bc3ce23f devops: upgrade Docker images to Node.js 18 (#20361)
Fixes https://github.com/microsoft/playwright/issues/20133
2023-01-26 16:34:32 +01:00
Andrey Lushnikov 59a41f6051 chore: prepare to publish dockerfile.vrt docker image (#19324)
This patch:
- adds a new `Dockerfile.vrt` image file based on focal that installs
  VRT-related dependencies inside it.
- updates scripts to build & publish the new docker image.

Drive-by: remove stale file
2022-12-07 15:57:01 -08:00
Max Schmitt 6a5552ba24 chore: drop Ubuntu 18.04 support (#18924) 2022-11-21 11:23:45 -10:00
Yury Semikhatsky 70065ba6dd Revert "chore(driver): roll driver to recent Node.js LTS version (#18… (#18791)
…636)"

The new node resolves loalhost to ::1 by default which breaks API tests
in the ports (Java in particular). Reverting to the previous LTS to
allow some time to implement happy eyeballs algorithm on our end by next
release.

This reverts commit 63a0b75186.
Reference https://github.com/microsoft/playwright/issues/18790
2022-11-14 11:30:36 -08:00
Max Schmitt 5d99719f5d chore: use Node.js 18 for Docker images (#18334)
Node.js 18 is now LTS and we follow LTS schedule.
2022-10-26 08:11:20 -07:00
Andrey Lushnikov af042beb13 feat: introduce docker integration (#16382)
This patch introduces the following commands:
- `npx playwright docker build` that builds a VRT docker image
  locally that is based off the `mcr.microsoft.com/playwright:jammy`
- `npx playwright docker start` that launches a docker container with
  browsers.
- `npx playwright docker stop` that stops given docker container.
- `npx playwright docker test` that runs all the tests inside a
  launched docker container.
2022-09-09 15:25:42 -07:00
Max Schmitt db5e097aca chore: add 'gpg' package to Docker images (#15917) 2022-07-25 12:49:51 +02:00
Max Schmitt 4f1ab2fa62 devops: fix Docker publishing 2022-06-14 11:20:29 +02:00
Ross Wollman b76d3f2b40 chore: fix publish_docker.sh (#14851)
Started failing a few days ago (https://github.com/microsoft/playwright/runs/6871909784?check_suite_focus=true)
with:

```
./utils/docker/publish_docker.sh: line 82: syntax error near unexpected
token `else'
```
2022-06-13 18:19:57 -07:00
Max Schmitt d1a7fa2901 chore: add Ubuntu 22 Docker image (#14755) 2022-06-09 23:19:54 +02:00
Andrey Lushnikov 4ab4c0bda1 feat: detect docker version and Playwright version mismatch (#12806)
This patch prints a friendly instructions in case Docker image version
mismatches Playwright version and there are missing browser
dependencies.

With this patch, Playwright will yield the following error:

```
root@f0774d2b2097:~# node a.mjs
node:internal/process/promises:279
            triggerUncaughtException(err, true /* fromPromise */);
            ^

browserType.launch:
╔════════════════════════════════════════════════════════════════════════════════════════════╗
║ Host system is missing dependencies to run browsers.                                       ║
║ This is most likely due to docker image version not matching Playwright version:           ║
║ - Playwright: 1.22.0                                                                       ║
║ -     Docker: 1.21.0                                                                       ║
║                                                                                            ║
║ Either:                                                                                    ║
║ - (recommended) use docker image "mcr.microsoft.com/playwright:v1.22.0-focal"              ║
║ - (alternative 1) run the following command inside docker to install missing dependencies: ║
║                                                                                            ║
║     npx playwright install-deps                                                            ║
║                                                                                            ║
║ - (alternative 2) use Aptitude inside docker:                                              ║
║                                                                                            ║
║     apt-get install libgbm1                                                                ║
║                                                                                            ║
║ <3 Playwright Team                                                                         ║
╚════════════════════════════════════════════════════════════════════════════════════════════╝
    at file:///root/a.mjs:3:10 {
  name: 'Error'
}```

Fixes #12796

Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2022-03-25 14:45:53 -07:00
Max Schmitt 372a3219f3 chore: remove Python from main Docker image (#12431) 2022-03-10 19:51:35 +01:00
Max Schmitt 428a014cad devops: Docker publishing cleanups (#12341) 2022-02-24 18:10:34 +01:00
Andrey Lushnikov 6ea607ce2a devops: move docker publishing logic to main repo (#10768)
This patch:
- moves docker publishing to main repo
- extracts all the logic from the GHA YML file to Bash
- starts using the script in both `publish_canary.yml` and
  `publish_release.yml`

Fixes #10351
2021-12-07 15:28:47 -08:00
Andrey Lushnikov e680b733f5 devops: demand explicit arch when building docker (#10743)
Currently, arch is inhereted from host. This patch explicitly
sets desired docker build arch.

References #10351
2021-12-07 09:28:59 -08:00
Max Schmitt 0936ce2bbd chore: add wget to Docker images 2021-11-30 19:35:48 +01:00
Andrey Lushnikov 8ce6633937 chore: clean up docker image (#10260)
This patch:
- removes the Visual Regression bits from the images. These will
  probably be added back when it's ready for the prime time.
    * removes VNC && noVNC
    * removes Playwright Agent
- cleans up apt caches

This drops image size from 2.03GB to 1.91GB.
2021-11-11 15:35:57 -08:00
Max Schmitt 113d425f15 chore: use Node.js 16 in Docker (#9824) 2021-10-27 23:48:10 +02:00
Andrey Lushnikov 7927920c35 fix(docker): do not export DISPLAY for everybody without XVFB running (#9795)
Fixes #9756
2021-10-26 13:21:18 -07:00