Hi ,
My requirement is to create a docker container within a specific docker network and apply network chaos only on that network, so that other applications running on the host is not impacted.
Here is what I have done. But the delay is not working. only working with --interface eth0.
-
create a docker network.
docker network create -d bridge --subnet 172.25.0.0/16 isolated_nw44
-
Run a docker container in this network.
docker run -d -p 4444:4444 -v /dev/shm:/dev/shm --name=container44 --network=isolated_nw44 --ip=172.25.3.3 selenium/standalone-chrome
-
check the network interface created, where the docker container is.
ip addr | grep 172.25 ==> inet 172.25.0.1/16 scope global br-72aff75d4744
-
Now applying netem on the new interface (br-72aff75d4744)
./pumba_linux_amd64.v0.6.5 netem --duration 5m --interface br-72aff75d4744 --tc-image gaiadocker/iproute2 delay --time 1000 container44
Result : It is not resulting any additional delay for the URL(http://ipadderss-of-host:4444/)
- If I apply following command, netem is applying the delay but entire box network is impacted.
./pumba_linux_amd64.v0.6.5 netem --duration 5m --interface eth0 --tc-image gaiadocker/iproute2 delay --time 1000 container44
Hi ,
My requirement is to create a docker container within a specific docker network and apply network chaos only on that network, so that other applications running on the host is not impacted.
Here is what I have done. But the delay is not working. only working with
--interface eth0.create a docker network.
docker network create -d bridge --subnet 172.25.0.0/16 isolated_nw44Run a docker container in this network.
docker run -d -p 4444:4444 -v /dev/shm:/dev/shm --name=container44 --network=isolated_nw44 --ip=172.25.3.3 selenium/standalone-chromecheck the network interface created, where the docker container is.
ip addr | grep 172.25==> inet 172.25.0.1/16 scope global br-72aff75d4744Now applying netem on the new interface (br-72aff75d4744)
./pumba_linux_amd64.v0.6.5 netem --duration 5m --interface br-72aff75d4744 --tc-image gaiadocker/iproute2 delay --time 1000 container44Result : It is not resulting any additional delay for the URL(
http://ipadderss-of-host:4444/)./pumba_linux_amd64.v0.6.5 netem --duration 5m --interface eth0 --tc-image gaiadocker/iproute2 delay --time 1000 container44