Move and factorize most of docker code

* Move docker code in a base ContainerTests class
* Ensure BasicCLIInContainer inherit from both
* Make some changes to not hardcode constants and more logical places