I met "Bus error (core dumped)" when I run Firefox with Selenium to capture screenshot of web sites.
firefox -headless -screenshot https://developer.mozilla.com
*** You are running in headless mode.
ExceptionHandler::GenerateDump cloned child ExceptionHandler::WaitForContinueSignal waiting for continue signal...
1218
ExceptionHandler::SendContinueSignalToChild sent continue signal to child
Unable to init server: Could not connect: Connection refused
Bus error (core dumped)
How to avoid it? The answer is simple, to increase SHM size.
version: '3'
services:
firefox:
build: .
shm_size: 256m
docker run --shm-size 256m