title: Connection refused on nginx docker container
body: <p>I've installed <a href="https://www.docker.com/toolbox" rel="nofollow noreferrer">Docker Toolbox</a> in macOS and I'm following Docker's simple tutorial on <a href="https://blog.docker.com/2015/04/tips-for-deploying-nginx-official-image-with-docker/" rel="nofollow noreferrer">deploying Nginx</a>.</p>
  
  <p>I've executed <code>docker run</code> and confirmed that my container has been created:</p>
  
  <pre><code>docker run --name mynginx1 -P -d nginx
  docker ps
  40001fc50719  nginx  "nginx -g 'daemon off"  23 minutes ago  Up 23 minutes  0.0.0.0:32770-&gt;80/tcp, 0.0.0.0:32769-&gt;443/tcp  mynginx1
  </code></pre>
  
  <p>however when I <code>curl http://localhost:32770</code>, I get a connection refused error:</p>
  
  <pre><code>curl: (7) Failed to connect to localhost port 32770: Connection refused
  </code></pre>
  
  <p>I'm struggling to see what I could have missed here. Is there an extra step I need to perform, in light of me being on macOS?</p>