title: curl: (7) Failed to connect to localhost port 10001: Connection refused DOCKER
body: <p>I start my docker container with:</p>
  <pre><code>docker run -it --expose 10001 --expose 8080 -p 10001:10001 -p 8080:8080 -p 80:80 --rm lucchi/covid90/100e
  </code></pre>
  <p>My docker -ps then has:</p>
  <pre><code>CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS                  PORTS                                                                  NAMES    
  1521e0c3d947        lucchi/covid90/100e   &quot;/bin/sh -c /bin/bash&quot;   2 seconds ago       Up Less than a second   0.0.0.0:80-&gt;80/tcp, 0.0.0.0:8080-&gt;8080/tcp, 0.0.0.0:10001-&gt;10001/tcp   funny_panini
  </code></pre>
  <p>But I can't connect to localhost from inside the container. I tried:</p>
  <pre><code>curl 0.0.0.0:8080 
  curl 127.0.0.1:8080
  curl https://localhost:8080
  </code></pre>
  <p>but keep getting</p>
  <pre><code>curl: (7) Failed to connect to localhost port 8080: Connection refused
  </code></pre>
  <p>Most of the asnwers I read are about adding -p to the run command, I don't get what I'm missing.</p>