【发布时间】:2015-01-16 10:27:10
【问题描述】:
我想在 Elastic Beanstalk 中增加 Docker 中的 ulimit 以运行一些应用程序。 我知道我需要增加 Docker 主机的 ulimit 并重新启动 docker 服务,但找不到方法。
我写了关注.ebextensions/01limits.config,但仍然无法增加ulimit。
commands:
01limits:
command: echo -e "#commands\nroot soft nofile 65536\nroot hard nofile 65536\n* soft nofile 65536\n* hard nofile 65536" >> /etc/security/limits.conf
02restartdocker:
command: service docker restart
添加于 2014 年 11 月 20 日 09:37 GMT
还尝试了以下配置文件。
commands:
01limits:
command: echo -e "#commands\nroot soft nofile 65536\nroot hard nofile 65536\n* soft nofile 65536\n* hard nofile 65536" >> /etc/security/limits.conf
02restartdocker:
command: service docker stop && ulimit -a 65536 && service docker start
它成功增加了ulimit,但在管理控制台中显示以下错误:
[Instance: i-xxxxxxxx Module: AWSEBAutoScalingGroup ConfigSet: null] 命令在实例上失败。返回代码:1 输出:[CMD-AppDeploy/AppDeployStage1/AppDeployEnactHook/00flip.sh] 命令失败,错误代码 1:/opt/elasticbeanstalk/hooks/appdeploy/enact/00flip.sh 停止 nginx:[确定] 启动 nginx:[确定] 正在停止当前应用程序容器:1c**********...来自守护程序的错误响应:无法销毁容器 1c**********:驱动程序设备映射器无法删除根文件系统 1c*** ****************************************************** *********:设备忙 2014/11/20 09:06:36 错误:无法删除一个或多个容器。
我不确定这个配置是否合适。
【问题讨论】:
-
除了我的问题特定于 Elastic Beanstalk 之外,它是重复的。
标签: amazon-web-services docker amazon-elastic-beanstalk