title: How do I bind a folder from a docker container to Windows?
body: <p>High High, </p>
  
  <p>I have a very specific problem here &amp; 3 days of searching hasn't helped.</p>
  
  <p>I have a docker file running my (enviroment) so to speak, currently it sets the container up, downloads the repo from git and cd's (WORKDIR) into said folder. It then does an NPM start (angular2) and forwards the port to my host (so I can see the localhost:4200 on my host browser). </p>
  
  <p>All of this is pretty neat, except the final missing piece. I want to "mount &amp; bind" the repo folder to windows (host machine) so that I can grab the code, edit it there. </p>
  
  <p>I have tried using -v (host_path):(container_path) during docker run [image-name] but that produces an error where the container exits immediately after starting with code 254 (???????) and yes that's with me using -d (detached mode)</p>
  
  <p>In fact here is my entire run command..</p>
  
  <pre><code>docker run -dt -it --publish 4200:4200 --privileged -v (host_path):/(container_path) [image-name]
  </code></pre>
  
  <p>... I've tried this approach <a href="https://stackoverflow.com/questions/36553617/how-do-i-mount-bind-inside-a-docker-container">Other Stack Solution</a> which is basically mounting and or binding the folder inside the container after running it which was successful to an extent. I don't know where the /mnt/test directory exists (it seems to be nonexistent) on the host machine.</p>
  
  <p>Other things I've tried include Unison Rsync which is beyond frustrating to say the least because I don't think it has an idea that the other argument is a host path.</p>
  
  <p>Please help if you can!</p>
  
  <p><a href="https://i.stack.imgur.com/2hPnr.png" rel="nofollow noreferrer">Here is a pic of how it exits when doing -v during docker run</a></p>