Insufficient shared memory on docker containers

Original thread @ Shared Memory for Firefox docker container

It looks like the shared memory size is tiny in comparison to the resource class. The Firefox browser (in a container) crashes when it has less than 2GB of shared memory – this is a pretty widely reported issue (see below) and is easily mitigated with a docker run flag (--shm-size=2g or -v /dev/shm:/dev/shm).

It seems like I can crash the Firefox browser in CircleCI by choosing a resource class smaller than xlarge. This is pretty ridiculous since the class has 16GB of memory – and there is less than 20% memory utilization.

Reported issue: