(Visited 53 times, 1 visits today)
# create a swarm overlay network
docker network create swarm_vlan10 –driver overlay
# create a swarm overlay network with a vlan
docker network create swarm_vlan10 –driver overlay –subnet 192.168.10.0/24 –gateway 192.168.10.1
docker network create swarm_vlan20 –driver overlay –subnet 192.168.20.0/24 –gateway 192.168.20.1
# create a swarm docker service with above network
docker service create –name papajones –network swarm_vlan10 –replicas 3 nginx
docker service create –name mcd –network swarm_vlan20 –replicas 3 nginx
Chinchu A. Thomas is an Infrastructure Analyst specializing in Microsoft Azure, the Microsoft 365 suite, AWS, and Windows infrastructure management products.