I am trying to use Pumba to isolate a container from the docker network. I am on Windows, and the command I am using is the following.
docker run \
-d \
--name pumba \
--network docker_default \
-v //var/run/docker.sock:/var/run/docker.sock
gaiaadm/pumba netem \
--tc-image="gaiadocker/iproute2" \
--duration 1000s \
loss \
-p 100 \
753_mycontainer_1
I start the container to isolate using docker-compose, with the restart property set to always. My wish is to let Pumba block the networking of the container also after each restart.
How can I achieve this behavior?
Thanks.
I managed to achieve the result, letting the docker restart the
pumbacontainer. I reduce thedurationparameter to30sthat is the average time for my753_mycontainer_1container to stop itself and restart.In this way, the two containers restart more or less synchronously, producing a real chaos test, in which the
753_mycontainer_1container randomly lose the network.