How to tune kernel properties in Docker Images

Maybe it’s too late for an answer, but perhaps this could help others who bump into similar issue with kernel /proc settings.

I guess a container has a virtual link to the /proc path of the host it’s running on. It’s automatically mounted into the container.

In my case, an app warns that /proc/sys/net/core/rmem_max and /proc/sys/net/core/wmem_max must have values greater than the default. I edit /etc/sysctl.conf on the host it’s running on to add the following:

# Allow a 25MB UDP receive buffer for JGroups  
net.core.rmem_max = 26214400  
# Allow a 1MB UDP send buffer for JGroups  
net.core.wmem_max = 1048576

I run sysctl -p, then I deploy the app. The app stops giving me the warnings.