Skip to content

Instantly share code, notes, and snippets.

@mikoim
Last active January 9, 2020 10:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mikoim/2c20edeb78e58f2146b5afd7f001b98b to your computer and use it in GitHub Desktop.
Save mikoim/2c20edeb78e58f2146b5afd7f001b98b to your computer and use it in GitHub Desktop.
How to avoid "Bus error (core dumped)" when you run Firefox inside Docker container

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment