title: Docker Toolbox (Windows): invalid volume specification
body: <h2>Configration</h2>
  
  <p>Using Windows 10, Docker Toolbox (<strong>not</strong> native Docker, to be able to use VMs).</p>
  
  <h3>Background</h3>
  
  <p>There is a Python (2.7) script that is supposed to run a Docker container. The code looks like this:</p>
  
  <pre><code>self.docker.containers.run('container_name',
                             command='bash -c "%s"' % command,
                             volumes={PROJECT_PATH: {'bind': '/shared', 'mode': 'rw'}},
                             working_dir='/shared',
                             remove=True,
                             **kwargs)
  </code></pre>
  
  <h2>Problem</h2>
  
  <p>Trying to run the script:</p>
  
  <pre><code>* Building the DummyProbe docker image
  * Running the DummyProbe container   
  500 Server Error: Internal Server Error ("invalid volume specification: 'C:\Users\Foo\..:/shared:rw'")
  </code></pre>
  
  <h3>Thoughts</h3>
  
  <p>After searching the web the <code>invalid volume specification</code> is seems to be caused by the way Windows and Linux handle directory structure. Linux uses slashes <code>/</code> while Windows - back-slashed <code>\</code>. Similar questions:</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/41602083/docker-toolbox-windows-invalid-volume-specification">Docker Toolbox Windows - Invalid volume specification</a></li>
  <li><a href="https://stackoverflow.com/questions/51712934/invalid-volume-specification-trying-to-run-portainer-container">Invalid volume specification trying to run portainer container</a></li>
  </ul>
  
  <p>However in my case the <code>COMPOSE_CONVERT_WINDOWS_PATHS</code> is set (to <code>true</code>, tried setting to <code>1</code> as well):</p>
  
  <h3>PowerShell</h3>
  
  <p><a href="https://i.stack.imgur.com/q0T4C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/q0T4C.png" alt="enter image description here"></a></p>
  
  <h3>Docker Toolbox</h3>
  
  <pre><code>$ docker-machine env
  export DOCKER_TLS_VERIFY="1"
  export DOCKER_HOST="tcp://111.111.11.111:1111"
  export DOCKER_CERT_PATH="C:\Users\Foo\.docker\machine\machines\default"
  export DOCKER_MACHINE_NAME="default"
  export COMPOSE_CONVERT_WINDOWS_PATHS="true"
  # Run this command to configure your shell:
  # eval $("C:\Program Files\Docker Toolbox\docker-machine.exe" env)
  </code></pre>
  
  <p>None of the suggestions in other questions work.</p>
  
  <h2>Update</h2>
  
  <p>Tried to use to replace <code>\</code> with <code>/</code> and use it in script:</p>
  
  <pre><code>500 Server Error: Internal Server Error ("invalid volume specification: 'C:/Users/***/..:/shared:rw'")
  </code></pre>
  
  <p>So it seems like it is not an issue</p>