How to Configure Openfiles Limit for Docker Containers
The Ask
From the docker host (CentOS 7) is possible to see that the open files limit is set to 1024.
# ulimit -a | grep open
open files (-n) 1024
But the docker container has this limit set to 1048576
[root@e86ee2f0f6a0 /]# ulimit -a | grep open
open files (-n) 1048576
Is it possible to change this value for the docker containers?
The Answer
The open files limit is set by default to 1048576. This limit is not related to the host’s limit. There are 2 possible way how to change this limit: