Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

215
Vistas
Amazon ECS support for --shm-size in docker

I am trying to use AWS EC2 Container Service (ECS) in order to run a dockerized webdriver (Selenium) Grid. According to 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 long running tests using the chrome browser on the selenium-node-chrome image.

On my EC2 instance, when I do a

df -h

I see that /dev/shm exists and has 3.7Gb of available free space. But if I mount the volume to my chrome-node container using the -v /dev/shm:/dev/shm property, the browser is not even coming up when I run a test. But if I mount the parent /dev directory, tests seem to run for a few seconds and then I get the "Unable to reach Browser exception" because the browser is then getting closed (I was able to confirm this through VNC Viewer). This makes me realize that mounting a volume through ECS interface / api is not gonna help.

If I directly start docker without going through the ECS route by passing the --shm-size property like

docker run --shm-size=2500m ....

The tests seem to run without any trouble.

But, ECS clearly does not support the --shm-size property as of now. So how to fix or work around this issue and still use ECS to pass the --shm-size property? Is avoiding the usage of ECS the only way here or is there any other better way?

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

A workaround:

Add below (EntryPoint) command as the last line in your dockerfile

ENTRYPOINT shm_dir=/dev/shm;umount $shm_dir;mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=*<size eg. 500m,1Gb>* shm $shm_dir  && /bin/bash

I have tested this change in local docker, although it requires --privileged or at least --cap-add SYS_ADMIN. I have yet to test it on AWS.

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda