Docker Community Forums

Share and learn in the Docker community.

SWARM and MAC VLAN Driver


(Guptamanish1983) #1

The objective is to assign IP address from VLAN to a container. I created a MACVLAN with scope LOCAL. the container is able to get an IP from VLAN
the issue is when I use SWARM to create multiple containers
at this time, container getting different IP address instead of the VLAN

After docker service create, i get ip addres config as

        "Config": [
            {
                "Subnet": "172.19.0.0/16",
                "Gateway": "172.19.0.1"
            }
        ]

where as my orig config was

   "Config": [
            {
                "Subnet": "10.15.200.0/24",
                "Gateway": "10.15.200.1"
            }

Any help to solve and get a real IP