I think I know how to assign a static ip in docker. Something like this seems to work:
docker run -it --rm --net=br0 --cap-add=NET_ADMIN --ip=172.27.153.11 mbussim
The problem is doing this in docker-py, which I think is just a python docker interface to docker.
In principle, docker-py tries to follow the docker lead:
You would think something like this would work:
options = { "detach": True, "ip": "172.27.153.11", #"remove": True, "name": "mbussim_" + str(count), "cap_add": "NET_ADMIN" } }
self.dockcon = self.dockerclient.containers.run(self.dimg, **options)
However, this does not work. Perhaps, this is not possible it docker-py?