mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-15 22:22:53 +03:00
.. | ||
chrome.json | ||
Dockerfile.bionic | ||
README.md |
Running Playwright in Docker
Dockerfile.bionic is a playwright-ready image of playwright. This image includes all the dependencies needed to run browsers in a Docker container.
Usage
This image is published on Docker Hub.
Pull the image
$ docker pull mcr.microsoft.com/playwright:bionic
Run the image
$ docker container run -it --rm --ipc=host --security-opt seccomp=chrome.json mcr.microsoft.com/playwright:bionic /bin/bash
Note that:
- The seccomp profile is required to run Chrome without sandbox. Thanks to Jessie Frazelle.
- Using
--ipc=host
is also recommended when using Chrome (Docker docs). Chrome can run out of memory without this flag.
Using on CI
See our Continuous Integration guides for sample configs.
Development
Build the image
$ docker build -t mcr.microsoft.com/playwright:bionic -f Dockerfile.bionic .
Push
Playwright on Docker Hub relies on
$ docker push playwright.azurecr.io/public/playwright:bionic
Base images
playwright:bionic
is based on Ubuntu 18.04 LTS (Bionic Beaver).
Alpine
Browser builds for Firefox and WebKit are built for the glibc library. Alpine Linux and other distributions that are based on the musl standard library are not supported.