docker container: changing network kernel settings, net.core.rmem_max
Asked Answered
R

1

7

I'm trying to set net.core.rmem_max=26214400 on a container

I have this docker-compose

    develop:
      sysctls:
       - net.core.rmem_max=26214400
      image: centos6

but when I do

docker-compose up -d develop

I get this error

ERROR: for develop_1  Cannot start service develop: OCI runtime create 
failed: container_linux.go:348: starting container process caused
 "process_linux.go:402: container init caused \"open
 /proc/sys/net/core/rmem_max: no such file or directory\"": unknown

ERROR: for develop  Cannot start service develop: OCI runtime create
 failed: container_linux.go:348: starting container process caused
 "process_linux.go:402: container init caused \"open
 /proc/sys/net/core/rmem_max: no such file or directory\"": unknown
Rident answered 1/3, 2019 at 17:51 Comment(0)
I
1

What docker image are you using? Not all namespaced kernel parameters on the host are available in the container. Most likely the one you mention is not.

You can quickly inspect which are indeed available by running:

docker run --rm develop ls -l /proc/sys/net/core

I'd also recommend checking the corresponding compose docs.

Irritating answered 24/5, 2021 at 12:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.