how to set ulimit / file descriptor on docker container the image tag is phusion/baseimage-docker

前端 未结 8 2078
失恋的感觉
失恋的感觉 2020-11-28 06:32

I need to set the file descriptor limit correctly on the docker container I connect to container with ssh (https://github.com/phusion/baseimage-docker)

Already trie

8条回答
  •  遥遥无期
    2020-11-28 07:08

    The docker run command has a --ulimit flag you can use this flag to set the open file limit in your docker container.

    Run the following command when spinning up your container to set the open file limit.

    docker run --ulimit nofile=: the first value before the colon indicates the soft file limit and the value after the colon indicates the hard file limit. you can verify this by running your container in interactive mode and executing the following command in your containers shell ulimit -n

    PS: check out this blog post for more clarity

提交回复
热议问题