Run test using Selenium + Chrome that run inside a Docker container, (Host is Ubuntu)
Need to simulate different network condition for each container, in and out bandwidth, latency, firewalls. can I use tool like https://github.com/tylertreat/Comcast on each container and it will not effect the networking condition of other containers?
Is there a better way to do that?
I see this https://github.com/docker/docker/issues/37 but not clear how to use it.
I'm using this command to affect only the network conditions of one container:
sudo nsenter -t PID -n comcast --latency=2000 --target-port=9200
PID needs to be one of the PIDs of the container
nsenter ... -n enter in the network namespace of the container
Found this seem to be just working,
docker run with --privileged=true in the docker image can use any program that work to shape the network traffic, worked for me comcast, tc and iptables
each docker get his own network profile and one container does not effect other containers.
see also https://github.com/tylertreat/comcast/issues/48#issuecomment-326088625
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With