Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing interface settings in Docker

I'm trying to disable TCP Segmentation Offload (TSO) of the loopback interface in a Docker image. I use the command:

sudo ethtool -K lo tso off

And I keep getting the message:

Cannot set device feature settings: Operation not permitted.

I read that the network interface of the Docker image bridges the interface of the host machine. So, I thought that perhaps I needed to change the setting in the host interface, but that neither doesn't work.

Anyway, the loopback interface doesn't need to be bridged, right? It can be virtualized in the image, as the packets don't leave the guest machine, right?

I'm thinking about recompiling the kernel of the image (I'm using Docker's default Ubuntu image, which is the backports distribution). I could set these properties in the image and commit it to my Docker repository. I would like to know your opinion on this, before getting too far?

Does anybody know an easier way to do this in Docker?

like image 253
synack Avatar asked Oct 17 '25 20:10

synack


1 Answers

I used the new Docker 0.6 new privileged mode option.

Running the container in this mode allowed me to change the guest interface settings:

docker run --privileged -it <image>
sudo ethtool -K lo tso off
like image 96
synack Avatar answered Oct 20 '25 14:10

synack



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!