devplayer0 / docker-net-dhcp

Docker network driver for networking on a host bridge with DHCP-allocated IP addresses
GNU General Public License v3.0
202 stars 55 forks source link

docker network create --scope=swarm fails #39

Open jimbothigpen opened 1 year ago

jimbothigpen commented 1 year ago

Any way to get this driver to create a network with --scope=swarm instead of local scope? My main motivation for testing this is to give a few docker containers static IP addresses via my local dhcp server, since it's impossible to assign an address to a container attached to a macvlan network in swarm mode. I'm able to create dhcp networks with this driver in local scope on each individual node in the swarm, but that won't allow me to attach any swarm services to that network. When I run:

docker network create --scope=swarm -d ghcr.io/devplayer0/docker-net-dhcp:release-linux-amd64 --ipam-driver null -o skip_routes=true -o lease_timeout=60s -o bridge=vmbr1 dhcp-net-vmmbr1

I get:

Error response from daemon: rpc error: code = InvalidArgument desc = error during lookup of plugin null