I am using docker-py to build an image and create a container. The container should include port bindings. The idea is that I will have multiple clients accessing the image and be able to open multiple containers. As such, I want the port to increment every time a new container is created, for example: container1 port:5000 ; container2 port:5001 ; etc...
How would I go about implementing this function in python?
Thanks