title: Testing connection to docker daemon
body: <p>I am writing a script that will boot docker-compose automatically.</p>
  
  <p>However, sometimes, doing <code>eval "$(docker-machine env default)"</code> doesn't cause the docker daemon to be connected immediatly and when the next line comes (<code>docker-compose up</code>) I get <code>Cannot connect to the Docker daemon. Is the docker daemon running on this host?</code></p>
  
  <p>If I use <code>sleep</code> for a few seconds the issue resolves.</p>
  
  <p>Is there a way to test the connect to daemon via some system tool (checking if a process exists, if a network connect was made, port listened to, etc)? I want to test the docker daemon externally and not use <code>docker</code> cli</p>