title: Docker: How to start an existing container and forward the ports?
body: <p>I am new to docker and I'm trying to get a permanent installation of Rancher started. To create the docker container I run the following command:</p>
  
  <p><code>docker run -d --name rancher-server -p 8080:8080 rancher/server</code></p>
  
  <p>Note that I want to forward the container's 8080 port to my hosts' 8080, since 80 is occupied by nginx on my host.</p>
  
  <p>Now, when I stop the above container and try to start it again using <code>docker start &lt;Container ID&gt;</code> I get the following error: </p>
  
  <p><code>Error response from daemon: driver failed programming external connectivity on endpoint rancher-server (c18940f957ed1f737fd5453ea29755adea762d758643a64984d5e3ce8bd3fdbe): Error starting userland proxy: listen tcp 0.0.0.0:80: bind: address already in use
  Error: failed to start containers: c93794a8c0ad</code></p>
  
  <p>I know that this happens since nginx is using port 80, so my question is how do I start my existing container and tell it to forward its ports?</p>
  
  <p>Running <code>docker start -d -p 8080:8080 c93794a8c0ad</code> gives me the following error: <code>unknown shorthand flag: 'd' in -d</code></p>
  
  <p>So how do I start a container with forwarded ports? Thank you!</p>