worstcase / blockade

Docker-based utility for testing network failures and partitions in distributed applications
http://blockade.readthedocs.org
Apache License 2.0
907 stars 72 forks source link

Is it possible to assign static IP address to the containers? #70

Closed mminisha closed 6 years ago

mminisha commented 6 years ago

Like in docker-compose is it possible to assign static IP address in blockade? Looks like, blockade is assigning IP address at later stage in the lifecycle of containers (not sure), when I use

docker run --net mynet123 --ip 20.21.10.100 -it c197324bf9c3 -p 52204:52204 docker run -p 52205:52205 --net mynet123 --ip 20.21.10.101 -it c197324bf9c3

The nodes form a cluster as I expected. With blockade the application is not starting up.

In my case, I have to give the IP address of docker in the config file of my application when building an image itself.

labisso commented 6 years ago

This is not supported directly. However as I answered in your other question, you could use blockade add to add containers you've launched elsewhere.