title: Failed to start docker container after reboot
body: <p>I am hosting an own registry.<br>
  After rebooting the Server my registry container is unable to start.</p>
  
  <p>I used this command to start the registry</p>
  
  <pre><code>docker run -d -p 5000:5000 --name registry -v /var/lib/registry/:/var/lib/registry -v /root/certs:/certs -v /root/auth/:/auth -eEGISTRY_HTTP_TLS_CERTIFICATE=/certs/domain.crt -e REGISTRY_HTTP_ADDR=0.0.0.0:5000 -e REGISTRY_HTTP_TLS_KEY=/certs/domain.key -e "REGISTRY_AUTH=htpasswd" -e "REGISTRY_AUTH=htpasswd" -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd -e "REGISTRY_AUTH_HTPASSWD_REALM=Registry Realm" --restart always registry:2.7.1
  </code></pre>
  
  <p>After a reboot i get this message when i try "docker start registry":</p>
  
  <blockquote>
    <p>Error response from daemon: OCI runtime create failed: container with id exists: dfb0bef21bdfc8a89b59498befd37f83513e75527c0beb552e0400df2a2b7c7d: unknown
    Error: failed to start containers: registry</p>
  </blockquote>
  
  <p>Starting a new container works fine.<br>
  How can a fix, it and sould the container not start by itself because of "--restart alway"</p>
  
  <pre><code>docker --version
  </code></pre>
  
  <p>Docker version 18.09.6, build 481bc77</p>
  
  <p>Thx for your help.</p>
  
  <h3>Update</h3>
  
  <p>Intesting news I have written an init script to to the job,
  but the problem is exactly the same.  The container exists but isn't started.
  If I try to start it, I get the error message from above.</p>
  
  <p>On the boot screen in get this information.
  <a href="https://i.stack.imgur.com/xAfdX.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xAfdX.png" alt="enter image description here"></a></p>
  
  <p>So the docker daemon seam to be not ready.<br>
  Do you have any suggestions why?</p>