0

docker容器使用su切换用户时出错

 3 months ago
source link: https://chegva.com/2771.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

docker容器使用su切换用户时出错

报错信息:

su: /bin/bash: Resource temporarily unavailable

Dockerfile时执行如下命令即可:

sed -i 's/^*/#*/g' /etc/security/limits.d/90-nproc.conf

echo "*        soft    core    1024000" >> /etc/security/limits.conf

如果* soft nproc 1024这一行不注释,/etc/security/limits.conf中的配置就不会生效(RHEL6后新增,centos6.3官方容器中没有此配置)

centos7下需注释的文件为/etc/security/limits.d/20-nproc.conf

安志合个人博客,版权所有 丨 如未注明,均为原创 丨 转载请注明转自:https://chegva.com/2771.html | ☆★★每天进步一点点,加油!★★☆ | 

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK