title: Docker Toolbox Windows - Invalid volume specification
body: <p><strong>EDIT:</strong> The problem is the <code>COMPOSE_CONVERT_WINDOWS_PATHS</code> environment variable isn't getting set. I tried adding it to the <code>Dockerfile</code> and to a <code>.env</code> file but its not being set. I can't set any new environment variables. Its like its building it from a cached Dockerfile. </p>
  
  <p>I was running <code>docker-composer up</code> after deleting the container, but this didn't recreate a new container, even when adding <code>--force-recreate</code>, it created the container from the old Dockerfile. So I ran <code>docker build ./</code> instead, and it built a new container, it reinstalled all the packages, and it said that it was setting the new environment variables, but in the finished container, when I check kinematic, I see the new environment variables aren't set. But all of the old environment variables that were set when I built the container for the first time, they're all set. I don't know why this is happening, why I can't create a new container from the updated Dockerfile.</p>
  
  <p>I've found a number of threads about this error, it happens when trying to mount a volume in Windows docker-tools. When I run <code>docker-compose up</code>, I get this error:</p>
  
  <pre><code>ERROR: for web  Cannot create container for service web: Invalid bind mount spec "C:\\path\\to\\project:/app:rw": Invalid volume specification: 'C:\path\to\project:/app:rw'
  [31mERROR[0m: Encountered errors while bringing up the project.
  </code></pre>
  
  <p>In the <code>docker-compose</code> file I have this:</p>
  
  <pre><code>    volumes:
          - ./:/app
  </code></pre>
  
  <p>I tried setting this environment variable:</p>
  
  <pre><code>COMPOSE_CONVERT_WINDOWS_PATHS=1
  </code></pre>
  
  <p>to 1, as that worked for some people in another thread but its not working in this case. I tried adding an absolute path in linux like format:</p>
  
  <pre><code>    volumes:
          - /c/path/to/project:/app
  </code></pre>
  
  <p>and I get this error:</p>
  
  <pre><code>ERROR: for web  Cannot create container for service web: create \c\path\to\project: "\\c\\path\\to\\project" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed
  </code></pre>
  
  <p>Notice it reversed the forward slashes. Changing:</p>
  
  <pre><code>ENV COMPOSE_CONVERT_WINDOWS_PATHS=0
  </code></pre>
  
  <p>to 0 like that didn't change anything. </p>
  
  <p>If I give a Windows format absolute directory, I get the first error again. Both of those errors, I get them if I point to a directory that doesn't exist. </p>
  
  <p>Has anyone here figured out a way to resolve this?</p>