单主机docker容器VLAN划分
创建4个容器
[[email protected] ~]# docker run -itd --name con1 --net=none busybox:latest /bin/sh
[[email protected] ~]# echo "1" > /proc/sys/net/ipv4/ip_forward
[[email protected] ~]# sysctl -p
[[email protected] ~]# docker run -itd --name con2 --net=none busybox:latest /bin/sh
bb5e997b23f0bb5b9af4dbb60a01b2a7e256fede40007da9327d343b29d94432
[[email protected] ~]# docker run -itd --name con3 --net=none busybox:latest /bin/sh
0d42bc7d3a97206351d83d840cd1a1b90c4ddf259baa72f1861571bafde9aebc
[[email protected] ~]# docker run -itd --name con4 --net=none busybox:latest /bin/sh
8d5a8a2ce45ad64bf094239ed8225dc74a32d9fbcb3dc84826decab6cbac2426
安装pipeword
[[email protected] ~]# yum -y install git [[email protected] ~]# git clone https://github.com/jpetazzo/pipework [[email protected] ~]# cp ~/pipework/pipework /usr/local/bin/
原文地址:https://www.cnblogs.com/liujunjun/p/12096770.html
时间: 2024-10-18 02:08:16