您的位置:首页 > 运维架构 > Docker

A workaround to change shared memory size for Docker containers in AWS ECS

2017-12-01 11:47 1426 查看
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=<size, e.g. 500M, 1G> shm $shm_dir


References

https://bugs.chromium.org/p/chromium/issues/detail?id=519952#c6

https://github.com/aws/amazon-ecs-agent/issues/787
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐