title: Refresh net.core.somaxcomm (or any sysctl property) for docker containers
body: <p>I am trying to change <code>net.core.somaxconn</code> for docker container to be able to have larger queue of requests for my web application.</p>
  
  <p>On OS, outside docker, I first modify the property successfully:</p>
  
  <pre><code>$ cat /proc/sys/net/core/somaxconn
  128
  $ sudo sysctl -w net.core.somaxconn=1024
  net.core.somaxconn = 1024
  $ cat /proc/sys/net/core/somaxconn
  1024
  </code></pre>
  
  <p>But then I don't know how to propagate that change into docker. I've tried:</p>
  
  <ul>
  <li>Also editing <code>/etc/sysctl.conf</code> (in hope of docker reading that file on container launch)</li>
  <li>Restarting containers <code>sudo docker stop</code> and <code>sudo docker run</code> again</li>
  <li>Restarting the whole docker service by <code>sudo service docker restart</code></li>
  </ul>
  
  <p>But inside container, <code>cat /proc/sys/net/core/somaxconn</code> always shows <code>128</code>.</p>
  
  <p>I'm running docker 1.2 (so I cannot, by default, modify <code>/proc</code> attributes inside container) and in Elastic Beanstalk (so without <code>--privileged</code> mode, that would allow me to modify <code>/proc</code>).</p>
  
  <p>How can I propagate the sysctl changes to docker?</p>