Setting `shm_size` for Docker Containers?

Using Selenium browser to run tests, apparently, takes quite a bit of memory. Without the shm_size flag to increase allowed shared memory I get crashes from within Selenium (out of memory errors).

Is there a way within GitHub Actions to set this value?

Here’s how I do it locally in my docker-compose.yml:

    image: selenium/standalone-chrome-debug
    shm_size: 2gb
      - 4444:4444

I assume you mean for a job container? I haven’t tried myself, but based on the docs jobs.<job_id>.container.options should do the trick:

  image: selenium/standalone-chrome-debug
  options: --shm-size=2gb

Service containers have an options parameter that should work the same way.

1 Like

So simple, thank you! I was worried for a second :slight_smile:

1 Like