Debian – Docker image TCP buffer size

debiandockerdocker-composenetworking

I have a problem with a debian container in a cluster model. I'm starting a process in 3 containers that needs to communicate each other but during the process of initial communication an exception associated to the TCP buffer size its generated.

Following this post https://developer.ibm.com/answers/questions/236787/getting-warning-message-dcsv9413w-failed-to-set-bu/ I tried to change the settings net.ipv4.tcp_rmem and net.ipv4.tcp_wmem but they does not exist in the container, and reading another posts, it looks docker does not allow to change this kind of setting. Can anyone help?

Best Answer

The latest versions of docker do allow providing sysctl settings via the command line, e.g. docker run --sysctl (see https://docs.docker.com/engine/reference/commandline/run/#configure-namespaced-kernel-parameters-sysctls-at-runtime).

The two settings you need are supported (indeed, all net.* settings are supported), although you will need a recent docker release. See https://github.com/docker/docker/issues/4717 for some background.

Prior to that, however, your best (and only) bet was to configure the system accordingly, and have docker inherit the system's sysctl settings.