I have noticed that when I map a big port range to the host, the container startup can take several minutes (or even hang). The bigger the range, the longer the delay. And the docker client seems unresponsive to commands such as docker ps while the container finish starting. The only way out is to wait until container has finished starting, or restart the docker engine.
sudo docker run --name my_container --rm -p 16384-16600:16384-16600 my_image
After 20 minutes it hasn't finished starting, could not remove it (docker client unresponsive) and had to restart the docker daemon. Changing the range to a smaller one, like 16384-16600 takes around two minutes and an smaller one like 16384-16400 will take a couple of seconds. What's going on ?
I'm using docker 1.12 on ubuntu 16.10.