networking - 在 Docker 中更改接口(interface)设置

标签 networking docker

我正在尝试在 Docker 中禁用环回接口(interface)的 TCP 分段卸载 (TSO)图片。我使用命令:

sudo ethtool -K lo tso off

我不断收到消息:
Cannot set device feature settings: Operation not permitted.
我读到 Docker 镜像的网络接口(interface)桥接了主机的接口(interface)。所以,我想也许我需要更改主机界面中的设置,但这两者都不起作用。

反正loopback接口(interface)是不需要桥接的吧?它可以在镜像中虚拟化,因为数据包不会离开 guest 机器,对吧?

我正在考虑重新编译镜像的内核(我使用的是 Docker 的默认 Ubuntu 镜像,它是 backports 发行版)。我可以在镜像中设置这些属性并将其提交到我的 Docker 存储库。在走得太远之前,我想知道您对此的看法?

有人知道在 Docker 中更简单的方法吗?

最佳答案

我使用了新的 Docker 0.6 new privileged mode选项。

在这种模式下运行容器允许我更改访客界面设置:

docker run --privileged -it <image>
sudo ethtool -K lo tso off

关于networking - 在 Docker 中更改接口(interface)设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29103642/

相关文章:

java - 为什么 inet :/0. 0.0.0 被解释为 inet :/0:0:0:0:0:0:0:0 by com. sun.net.httpserver.HttpServer?

sockets - 同时处理多个连接的最佳方法

docker - 如何将 cypress 添加到我当前的 docker 中?

docker - 如何在 Docker 上为 Vue-router 配置 nginx

Docker SSH 转发 - 绑定(bind) : Address not available

docker - Keyvault 无法在通过 Visual Studio 中的 Docker 运行的应用程序中运行

networking - VagrantFile config.vm.network

图形的 Javascript 库(在数学意义上)

c# - 如何在具有一个数据库的两个系统上连接C#应用程序,两个应用程序是相同的

docker - Magit无法连接到docker内的emacsclient?