Docker 0.9 – /etc/sysctl.conf not working

I set net.core.somaxconn = 65535 in /etc/sysctl.conf inside an Ubuntu image.

But the net.core.somaxconn turns to 128 in the container using command sysctl -a | grep net.core.somaxconn.

  • Kafka producer configuration and docker
  • Solutions for a Multi-Tenant Platform using Django with Postgresql
  • Where are binaries of a program running inside a Docker container?
  • Where are data stored in a clustered environment?
  • mkdir .ssh in a Dockerfile, folder is not there?
  • Docker base image filesystem
  • After I execute sysctl -p, it turns to 65535.

    Why doesn’t /etc/sysctl.conf work when running a container (Docker 0.9) ?

  • Do docker pull using jenkins
  • Using Hadoop and Spark on Docker containers
  • Specify environment on start of component
  • Docker - wordpress deployed on Digital Ocean Droplet - where is the wp-content?
  • How to build Dockerfile with two jar files
  • How can I run bash in a new container of a docker image?
  • 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.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.