终端执行

docker network create -d macvlan \
    --subnet=10.0.0.0/24 \
    --gateway=10.0.0.2 \
    -o parent=enp3s0 macvlan

请自行修改IP,网关,网卡
10.0.0.0/24 是IP段和子网掩码
10.0.0.2 是网关
enp3s0 是网卡

Last modification:March 8th, 2021 at 09:30 am
If you think my article is useful to you, please feel free to appreciate