The Dockerfiles provided with this repository use Debian Buster instead of Alpine Linux, which made further customization a lot easier for me.
See Laravel Vapor documentation on how to use a docker based runtime.
The images are published to the following repository on Dockerhub: denizp/vapor
FROM denizp/vapor:php81-buster
COPY . /var/task
Puppeteer and spatie/browsershot
FROM denizp/vapor:php81-buster-puppeteer
COPY . /var/task
Tested and it works with the following Chromium arguments.
no-sandbox
single-process
disable-dev-shm6-usage
disable-gpu
no-zygote
$browsershot = new Browsershot('');
$browsershot
->noSandbox()
->waitUntilNetworkIdle();
if (app()->environment() !== 'local') {
$browsershot->addChromiumArguments([
'single-process',
'disable-dev-shm6-usage',
'disable-gpu',
'no-zygote'
]);
}