docs: document dbus in the docker guide (#12378)

This commit is contained in:
Alex Rudenko 2024-05-02 10:02:12 +02:00 committed by GitHub
parent dfb31f3e92
commit 533f83af5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 1 deletions

View File

@ -6,7 +6,9 @@
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const browser = await puppeteer.launch({
dumpio: true,
});
const page = await browser.newPage();
await page.goto('https://example.com');
await browser.close();

View File

@ -37,3 +37,17 @@ Make sure to specify a init process via the `--init` flag or a custom `ENTRYPOIN
to make sure all processes started by Puppeteer are managed properly.
:::
## dbus
The image installs and configures dbus for Chrome. Usually you would not
need dbus in the headless mode but you might see warnings in the browser
console. You can start the dbus service before launching
your application:
```
sudo service dbus start
```
See https://docs.docker.com/config/containers/multi-service_container/
for instructions how to start multiple processes in a container.