XD-2239 Make container IP/hostname configurabale

* Make the container IP address configurable
* Make the container hostname configurable
* Add tests

XD-2239 Code Review changes
XD-2239 Fix container host key