add ability to publish range of ports

Closes #8899
Signed-off-by: Srini Brahmaroutu <srbrahma@us.ibm.com>
I don't see why you need to check this in this test, we usually use `defer deleteAllContainers()`.