可能的解决方案,但我现在无法测试。 如果这不正确,请通知我。
使用macvlan创建虚拟网络接口:
参见 https://superuser.com/questions/175475/ip-address-alias-assigned-by-
dhcp
命令:
ip link add dev macvlan0 link eth0类型macvlan#macvlan0是v卡的名称(lol)
使用管道将容器连接到虚拟网络接口:
参见 https://github.com/jpetazzo/pipework/#connect-a-container-to-a-local-
physical-interface
命令:
管道系统macvlan0 $ {$ containerid)dhcp



