我正在尝试将虚拟网络适配器添加到Docker容器中。即不尝试连接到本地计算机上的任何实际接口。
我试过跑步
ifconfig
但无济于事:
[root@240ae570546a /]# ifconfig eth0:1 10.0.0.10/24 up
SIOCSIFADDR: Operation not permitted
SIOCSIFFLAGS: Operation not permitted
SIOCSIFFLAGS: Operation not permitted
SIOCSIFNETMASK: Operation not permitted
我还尝试将配置文件添加到
/etc/sysconfig/network-scripts/
当我建造码头集装箱,但这似乎也不起作用。
我的集装箱建在
centos:7
. 如何将虚拟NIC添加到容器中?