title: Access Docker forwarded port on Mac
body: <p>There is a related post here: <a href="https://stackoverflow.com/questions/35496273/port-mapping-in-docker-on-mac-osx-installed-with-docker-toolbox">Port mapping in Docker on Mac OSX installed with Docker Toolbox</a></p>
  
  <p>but it didn't work for me</p>
  
  <p><strong>Get ports for container</strong></p>
  
  <p>docker port 485186e65a5e</p>
  
  <pre><code>8080/tcp -&gt; 0.0.0.0:33360
  8088/tcp -&gt; 0.0.0.0:33359
  19888/tcp -&gt; 0.0.0.0:33358
  50070/tcp -&gt; 0.0.0.0:33357
  50075/tcp -&gt; 0.0.0.0:33356
  8042/tcp -&gt; 0.0.0.0:33361
  </code></pre>
  
  <p><strong>Check that someone listens to ports in container</strong></p>
  
  <pre><code>bash-4.1# netstat -alnpt | grep 19888
  tcp        0      0 127.0.0.1:19888             0.0.0.0:*                   LISTEN      1094/java   
  </code></pre>
  
  <p><strong>Do wget in container</strong></p>
  
  <pre><code>bash-4.1# wget 127.0.0.1:19888
  --2016-04-11 14:16:54--  http://127.0.0.1:19888/
  Connecting to 127.0.0.1:19888... connected.
  HTTP request sent, awaiting response... 302 Found
  Location: http://127.0.0.1:19888/jobhistory [following]
  --2016-04-11 14:16:54--  http://127.0.0.1:19888/jobhistory
  Reusing existing connection to 127.0.0.1:19888.
  HTTP request sent, awaiting response... 200 OK
  Length: 6763 (6.6K) [text/html]
  Saving to: `index.html'
  
  100%[================================================================================================================================================================================&gt;] 6,763       --.-K/s   in 0s      
  
  2016-04-11 14:16:54 (182 MB/s) - `index.html' saved [6763/6763]
  </code></pre>
  
  <p><strong>Try to access forwarded port from host, no luck... :(((</strong></p>
  
  <pre><code>$docker-machine ip default
  192.168.99.100
  $ wget 192.168.99.100:33358
  --2016-04-11 16:18:04--  http://192.168.99.100:33358/
  Connecting to 192.168.99.100:33358... failed: Connection refused.
  </code></pre>
  
  <p>What do I do wrong?</p>