docs: update Docker configuration recommendations (#34986)
This commit is contained in:
parent
b4abcfed45
commit
02e65d1825
|
@ -454,15 +454,7 @@ jobs:
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
We have a [pre-built Docker image](./docker.md) which can either be used directly or as a reference to update your existing Docker definitions.
|
We have a [pre-built Docker image](./docker.md) which can either be used directly or as a reference to update your existing Docker definitions. Make sure to follow the [Recommended Docker Configuration](./docker.md#recommended-docker-configuration) to ensure the best performance.
|
||||||
|
|
||||||
Suggested configuration
|
|
||||||
1. Using `--ipc=host` is also recommended when using Chromium. Without it Chromium can run out of memory
|
|
||||||
and crash. Learn more about this option in [Docker docs](https://docs.docker.com/reference/cli/docker/container/run/#ipc).
|
|
||||||
1. Seeing other weird errors when launching Chromium? Try running your container
|
|
||||||
with `docker run --cap-add=SYS_ADMIN` when developing locally.
|
|
||||||
1. Using `--init` Docker flag or [dumb-init](https://github.com/Yelp/dumb-init) is recommended to avoid special
|
|
||||||
treatment for processes with PID=1. This is a common reason for zombie processes.
|
|
||||||
|
|
||||||
### Azure Pipelines
|
### Azure Pipelines
|
||||||
|
|
||||||
|
|
|
@ -94,10 +94,15 @@ docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_prof
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
:::note
|
### Recommended Docker Configuration
|
||||||
Using `--ipc=host` is recommended when using Chrome ([Docker docs](https://docs.docker.com/engine/reference/run/#ipc-settings---ipc)). Chrome can run out of memory without this flag.
|
|
||||||
:::
|
|
||||||
|
|
||||||
|
When running Playwright in Docker, the following configuration is recommended:
|
||||||
|
|
||||||
|
1. **Using [`--init`](https://docs.docker.com/reference/cli/docker/container/run/#init)** Docker flag is recommended to avoid special treatment for processes with PID=1. This is a common reason for zombie processes.
|
||||||
|
|
||||||
|
1. **Using `--ipc=host`** is recommended when using Chromium. Without it, Chromium can run out of memory and crash. Learn more about this option in [Docker docs](https://docs.docker.com/reference/cli/docker/container/run/#ipc).
|
||||||
|
|
||||||
|
1. **If seeing weird errors when launching Chromium**, try running your container with `docker run --cap-add=SYS_ADMIN` when developing locally.
|
||||||
|
|
||||||
### Using on CI
|
### Using on CI
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue