playwright/docs/docker
2020-04-29 14:52:50 -07:00
..
chrome.json feat: add a playwright-ready docker image (#1161) 2020-02-28 14:40:26 -08:00
Dockerfile.bionic fix: Dockerfile for Firefox (#1937) 2020-04-23 08:43:53 -07:00
README.md docs: Recommend using --ipc=host in docker (#2038) 2020-04-29 14:52:50 -07:00

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.

Building image:

$ sudo docker build -t microsoft/playwright:bionic -f Dockerfile.bionic .

Running image:

$ sudo docker container run -it --rm --ipc=host --security-opt seccomp=chrome.json microsoft/playwright:bionic /bin/bash

Note

: The seccomp profile is coming from Jessie Frazelle. It's needed to run Chrome without sandbox.
Using --ipc=host is also recommended when using Chrome. Without it Chrome can run out of memory and crash.
See the docker documentation for this option here.