2020-02-29 01:40:26 +03:00
# Running Playwright in Docker
2020-03-03 23:21:21 +03:00
[Dockerfile.bionic ](Dockerfile.bionic ) is a playwright-ready image of playwright.
2020-02-29 01:40:26 +03:00
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:
```
2020-04-30 00:52:50 +03:00
$ sudo docker container run -it --rm --ipc=host --security-opt seccomp=chrome.json microsoft/playwright:bionic /bin/bash
2020-02-29 01:40:26 +03:00
```
> **NOTE**: The seccomp profile is coming from Jessie Frazelle. It's needed
2020-04-30 00:52:50 +03:00
> 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.](https://docs.docker.com/engine/reference/run/#ipc-settings---ipc)
2020-06-13 23:11:24 +03:00
## Playwright on Alpine
Browser builds for Firefox and WebKit are built for the [glibc ](https://en.wikipedia.org/wiki/GNU_C_Library ) library. Alpine Linux and other distributions that are based on the [musl ](https://en.wikipedia.org/wiki/Musl ) standard library are not supported.