Docker 0.9 – /etc/sysctl.conf not working
net.core.somaxconn turns to 128 in the container using command
sysctl -a | grep net.core.somaxconn.
After I execute
sysctl -p, it turns to 65535.
Why doesn’t /etc/sysctl.conf work when running a container (Docker 0.9) ？
One Solution collect form web for “Docker 0.9 – /etc/sysctl.conf not working”
This is probably the case because Docker does not run
sysctl for you. I don’t know how you start your container, but if you do something like
docker run -i -t image /bin/bash it only starts bash. There is no upstart kicked of or anything, so if you decide running
sysctl is important, you need to do that yourself.
For development purposes, you can use
docker run -i -t image sysctl -p && /bin/bash
For production use, you might want to take a look at supervisor or at my blog on that.