报错信息:
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