# docker run --name <container_name> --ulimit <type>=<soft>:<hard> <image>:<tag>
docker run --name igkim-01 --ulimit nofile=65535:65535 centos:latest
docker run --name igkim-02 --ulimit nproc=65535:65535 centos:latest
vi /etc/sysconfig/docker
OPTIONS="--ulimit nofile=65535:65535 --ulimit nproc=65535:65535"
systemctl restart docker
vi /etc/docker/daemon.json
# 아래 내용 추가
{
"default-ulimits": {
"nofile": {
"Name": "nofile",
"Hard": 65535,
"Soft": 65535
},
"nproc": {
"Name": "nproc",
"Hard": 65535,
"Soft": 65535
}
}
}
systemctl restart docker