2

my host is on Ubuntu 14.04.2 LTS and I'm using the latest centos base image in order to create a DOCKER image of IBM InfoSphere BigInsights in order to push it to the Bluemix Container Cloud.

I've solved nearly everything but I'm stuck with setting runtime kernel parameters using sysctl because they have the wrong value and the installer complains.

sysctl -a |grep net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 32768    61000

Of course it is not possible to set them inside the DOCKER container, I get the following error:

sysctl -w net.ipv4.ip_local_port_range="1024 64000"
sysctl: setting key "net.ipv4.ip_local_port_range": Read-only file system

So I've set the parameters on the host system:

sudo sysctl -w net.ipv4.ip_local_port_range="1024 64000"
net.ipv4.ip_local_port_range = 1024 64000

sudo sysctl -a |grep net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 1024 64000

I've even rebuilt the whole image and re-created the container but still inside the DOCKER container I get:

sysctl -a |grep net.ipv4.ip_local_port_range
net.ipv4.ip_local_port_range = 32768    61000

Any ideas?

Romeo Kienzler
  • 3,373
  • 3
  • 36
  • 58
  • [Refresh net.core.somaxcomm (or any sysctl property) for docker containers][1] [1]: http://stackoverflow.com/questions/26177059/refresh-net-core-somaxcomm-or-any-sysctl-property-for-docker-containers/26197875#26197875 – Rene Meyer Apr 01 '15 at 07:39
  • very good point, unfortunately there is no /proc/net.ipv4 on my host system, but I got your point and will think about it – Romeo Kienzler Apr 02 '15 at 15:28
  • But then once I set the host's kernel parameter through DOCKER IMHO there is no difference in setting them on the hosts system itself :( – Romeo Kienzler Apr 02 '15 at 15:28

1 Answers1

0

You need to reload sysctl. Give one of the following commands a try (they depend on your OS)

sudo /etc/rc.d/sysctl reload

or

sudo sysctl -p /etc/sysctl.conf

Jeff Sloyer
  • 4,899
  • 1
  • 24
  • 48