Say I have a network called "mynet" and I want to start a container with an IP address bound to 192.168.23.2.
The code I'm starting with is:
import docker
c = docker.from_env()
c.containers.run('containername', 'sh some_script.sh', network='mynet')
What do I do from here? I'm effectively looking for the equivalent to the --ip
option from docker run
.