Docker Tip #14 - Set the maximum number of open files

When running inside a container you can hit the number of open files limit, just like you would on a linux hsot. So how do you specify to Docker you want more open files beyond what the default is?

    docker run --ulimit nofile=1024:1024 rest_of_run_arguments

The command line above sets the soft and hard limit to 1024 open files. Adjust it to your needs when starting your Docker container.

Note the default number of open files comes from your Docker daemon.

Posted September 16, 2016