I wrote a python script to initialize a docker swarm which works fine, except when I want to give a custom name to the swarm. The documentation mentions the 'name' attribute, but when I do
client = docker.from_env()
client.swarm.init(name="ddddd" , ....)
I get the following error message:
EXCEPTION: 400 Client Error for http+docker://localhost/v1.41/swarm/update?version=10&rotateWorkerToken=False&rotateManagerToken=False: Bad Request ("swarm spec must be named "default"")