limits

vi /etc/security/limits.conf

# 末尾添加
root soft nofile 65535
root hard nofile 65535
# 可忽略
#root soft nproc 20480  
#root hard nproc 20480


重启

查看

ulimit -n

查看容器的ulimit

docker exec -it name sh
ulimit -n

#方法二
docker inspect <容器名或ID> | grep -i "ulimit"