Ulimits in Docker host vs container

前端 未结 3 2180
后悔当初
后悔当初 2021-01-31 18:20

I wasn\'t able to find straight answer, to this question, but here it is:

Let\'s say that I have a host which has max open files 1024:

[root@host]# ulimit          


        
3条回答
  •  萌比男神i
    2021-01-31 19:08

    I needed a direct answer to the OP's question:

    So will I have a problem in container if I try to open more then 1024 files?

    No. In this case I've found that the host value has no effect inside of the container and the Docker container can specify its own ulimit values.

    In other words, it is valid for your container to set a higher value than the host's default value. So the effective ulimit nofile value in the container is 1048576 and this will work fine.

提交回复
热议问题