title: Docker inspect format retrieve port mapping
body: <p>I'd like to retrieve the port mapped to a container using docker inspect, I found something like that:</p>
  
  <pre><code>docker inspect --format=" {{ .NetworkSettings.Ports }} " containerid
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>map[1234/tcp:[map[HostIp:0.0.0.0 HostPort:49159]] 3306/tcp:&lt;nil&gt; 4444/tcp:&lt;nil&gt; 4567/tcp:&lt;nil&gt; 4568/tcp:&lt;nil&gt;]
  </code></pre>
  
  <p>But I'd like to have an output like this:</p>
  
  <pre><code>1234/tcp:49159
  </code></pre>
  
  <p>Is it possible ?</p>