A workaround to change shared memory size for Docker containers in AWS ECS
A workaround to change shared memory size for Docker containers in AWS ECS
Issue
Because of not supporting to specify the following docker run parameter, containers in ECS cannot resize the shared memory.
–shm-size
Solution
Here is a workaround:
1. In order to operate devices with a container, execute docker run command with “–priviledge=true“
2. Run the following scripts with a contianer,
shm_dir=/dev/shm
umount $shm_dir
mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime,size=1G shm $shm_dir
References
https://bugs.chromium.org/p/chromium/issues/detail?id=519952#c6