title: Cannot stop or restart a docker container
body: <p>When trying to stop or restart a docker container I'm getting the following error message:</p>
  
  <pre><code>$ docker restart 5ba0a86f36ea
  Error response from daemon: Cannot restart container 5ba0a86f36ea: [2] Container does not exist: container destroyed
  Error: failed to restart containers: [5ba0a86f36ea]
  </code></pre>
  
  <p>But when I run</p>
  
  <pre><code>$ docker logs -f 5ba0a86f36ea
  </code></pre>
  
  <p>I can see the logs, so obviously the container does exist. Any ideas?</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>sorry, I forgot to mention this:</p>
  
  <p>When I run <code>docker ps -a</code> I see the container as up and running. However the application inside it is malfunctioning so I want to restart it, or just get a fresh version of that application online. But when I can't stop and remove the container, I also can't get a new application up and running, which would be listening to the same port. </p>