I am trying to use AWS EC2 Container Service (ECS) to run a web reseller grid (Selenium). According to the docker-selenium github page, we need to either add some shared memory
or mount a volume
to the docker container if we want to run tests for a long time using the Chrome browser on selenium-node-chrome .
In my EC2 instance, when I do
df -h
I see that /dev/shm
exists and has 3.7Gb of available free space
. But if I mount the volume in my chrome-node container using the -v /dev/shm:/dev/shm
, the browser doesnโt work even when the test runs. But if I mount the parent directory /dev
, the tests seem to run for a few seconds, and then I get "Unable to reach browser exception" because the browser closes (I was able to confirm this through the VNC Viewer). This makes me realize that setting the volume through the ECI / api interface will not help.
If I directly launched docker without going through the ECS route, passing the --shm-size
property, for example
docker run --shm-size=2500m ....
Tests seem no problem.
But, ECS does not explicitly support the --shm-size
property at the moment. So, how do I fix or work around this problem and still use ECS to pass the --shm-size
property? Avoid using ECS โโonly here or is there another better way?
source share