Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker impossible setup sysctl parameter in container RHEL 6.6

Tags:

docker

i created an images of RHEL 6.6 (FROM registry.access.redhat.com/rhel6.6) but when i run a container:

docker run --privileged --rm -h "DAN" --net net_custom --ip 200.0.2.3 -t -i test_beta_4 bash

and i try to load some parameter in sysctl.conf it return the following error:

error: "net.core.rmem_default" is an unknown key
error: "net.core.wmem_default" is an unknown key
error: "net.core.rmem_max" is an unknown key
error: "net.core.wmem_max" is an unknown key

i check under /proc/sys/net/core/ and i found out those file are missing. so how can i change those network kernel settings? im running docker on my mac. thanks

like image 390
Daniele_r81 Avatar asked Mar 09 '26 17:03

Daniele_r81


1 Answers

This same question came up on this particular github issue: https://github.com/moby/moby/issues/30778

It seems that these net.core parameters are not something that the kernel will be able to put in a namespace. The error message comes because docker is trying to set these, in the kernel denies it.

That issue is currently active at time of writing, and it looks like the docker developers will be looping in the kernel team.

As a workaround, it looks like you should be able to set those settings on your host globally, which should then extend into all of your containers.

like image 185
programmerq Avatar answered Mar 12 '26 07:03

programmerq