title: How to distinguish between Docker Toolbox and Docker for Mac/Windows?
body: <p>Is it possible to distinguish whether a user is using Docker Toolbox or Docker for Mac/Windows?</p>
  
  <p>I've already seen <a href="https://stackoverflow.com/questions/43242218/how-can-a-script-distinguish-docker-toolbox-and-docker-for-windows">this</a>.</p>
  
  <p>In order to do some tests, now I have both Docker for Mac and Docker Toolbox installed and running. I can run Docker for Mac simply by running:</p>
  
  <p><code>docker</code></p>
  
  <p>and Docker Toolbox by running:</p>
  
  <p><code>DOCKER_MACHINE_NAME=default DOCKER_CERT_PATH=$HOME/.docker/machine/machines/default DOCKER_TLS_VERIFY=1 DOCKER_HOST=tcp://192.168.99.100:2376 docker</code>.</p>
  
  <p>As answered <a href="https://stackoverflow.com/questions/43242218/how-can-a-script-distinguish-docker-toolbox-and-docker-for-windows">here</a>. I tried checking <code>DOCKER_TOOLBOX_INSTALL_PATH</code> env var, but in my case is empty. Then I thought that I could check whether the scheme of <code>DOCKER_HOST</code> is <code>tcp</code> and consider it to be Docker Toolbox, but then I realized that even with Docker for Mac is possible to have <code>tcp</code> scheme for <code>DOCKER_HOST</code>.</p>
  
  <p>I then ran <code>docker system info</code> for both Docker for Mac and Docker Toolbox. I noticed that in the first case there's:</p>
  
  <p><code>Operating System: Docker for Mac</code></p>
  
  <p>while in the second case:</p>
  
  <p><code>Operating System: Boot2Docker 18.09.4 (TCL 8.2.1)</code></p>
  
  <p>Is it safe then to check whether <code>OperatingSystem</code> contains case-insensitive the string <code>boot2docker</code> for both Mac and Windows?</p>