eval "$(docker-machine env default)" : <p>I have issues with launching docker with docker-compose.</p>

<p>When I run <code>docker-compose -f dev.yml build</code> I following error > </p>

<pre><code>Building postgres
ERROR: Couldn't connect to Docker daemon - you might need to run `docker-machine start default`.
</code></pre>

<p>However if I run <code>docker-machine ls</code> machine is clearly up > </p>

<pre><code>NAME      ACTIVE   DRIVER       STATE     URL                         SWARM   DOCKER    ERRORS
default   -        virtualbox   Running   tcp://192.168.99.100:2376           v1.12.1
</code></pre>

<p>I fixed the error by running <code>eval "$(docker-machine env default)"</code> after which <code>docker-compose -f dev.yml build</code> completes successfully.</p>

<p>My question why did this work, what actually happens and how do I undo it?</p>

<p>Also is this a safe way to fix this? Right now this just my laptop, but these containers are supposed to hit company servers in near future. </p>

<p>I am not super fluent with bash but I been always told not to run <code>eval</code> and especially not to run eval with " </p>
