Unleash traffic control on your Docker containers.
This package helps with emulating networks in distributed systems managed by Docker Compose. It uses a configuration file (netz.yml) next to the Compose file that looks like this
network-name:
container-name:
netem: options for netem
htb: options for htb (class)
Integrate netz into your docker-compose.yml like this
# ...
services:
# ...
netz:
image: pgorczak/netz
# command: -v -- if you want debug output
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- .:/netz
#...
Note: Affected containers must have the NET_ADMIN
capability and have the
tc
tool installed (part of iproute2).
Open a terminal in one of the example folders, then run
docker-compose up
.