How do I increase the limits in my docker containers on CoreOS?

By default, CoreOS and the Linux kernel have some pretty conservative limits, defined for things like open files and locked memory.

So, I increased the values ​​in /etc/systemd/system.conf:

DefaultLimitNOFILE=500000
DefaultLimitMEMLOCK=unlimited

      

However, when I run docker containers the limits are still low. ulimit -l prints 64.

Running ulimit -l prints the error indefinitely.

ulimit: maximum locked memory: limit cannot be changed: operation not allowed

So, I posted

LimitMAXLOCKED=unlimited
LimitNOFILE=64000

      

In my system file.

However, these values ​​don't reach the docker container, and calling them still doesn't work. I rebooted the machine after changing the system defaults.

This is most likely a systemic thing. How to fix it?

+3


source to share


1 answer


Docker containers are not started or managed by the dd system. The Docker daemon is responsible for setting the limits. Here's an example taken from the official documentation :



# docker run --ulimit nofile=1024:1024 --rm debian sh -c "ulimit -n"

      

0


source







All Articles