title: Start Docker container with random host port and return the port to use it elsewhere
body: <p>I want to start a docker container with ,let's say jenkins as a service, and let docker allocate a random host port. I know how to do this .</p>
  
  <p>How can I grab the randomly selected port from the running container, or tell docker to return it, in order to use it in the construction of the jenkins github plugin url</p>
  
  <pre><code>http://host-ip:random-host-port/web-hook
  </code></pre>