Improvements to the docker integration

Make docker integration compatible with python 2.4
Make sure to not collect too many containers