You can say that Docker uses LXC under the hoods: use the option -e lxc.
Create your containers with a custom LXC directive to put them into a **traffic class** :
`docker run --lxc-conf="lxc.cgroup.net_cls.classid = 0x00100001" your/image /bin/stuff`
Check out the white paper on how to apply bandwidth limits for this class.
Note. Parameters --storage-driver=devicemapperand -e lxcare for the Docker daemon, not for the Docker client that you use at startup docker run ........
You can also do this via:
mkdir /var/run/netns
ln -sf /proc/`docker inspect -f '{{ .State.Pid }}' YOUR_CONTAINER`/ns/net /var/run/netns/SOME_NAME
ip netns exec SOME_NAME iptables -L -nv
source
share