Reputation: 523
I'm running a Docker Linux container in a Docker for Windows environment. I'm also using a Dockerfile to docker-compose up for my project.
I'm having trouble getting my volume mounts to mount correctly. Specifically in my Kitematic I can see that the text '\host_mnt' is being added to the beginning of my volume path. So my volume path looks like '\host_mntC:\Users\blah\blah\blah'. The path is correct except that there is the '\host_mnt' being added to the beginning.
My suspicion is that I have to somehow have my volume mount path put in incorrectly in my Dockerfile. I've tried using relative path, using absolute path and using both expanded notation for volumes and the one line way of writing volumes.
Upvotes: 2
Views: 7188
Reputation: 71
try reset docker to factory defaults. in docker->settings->Reset.
see this https://github.com/docker/compose/issues/5563
Upvotes: 0
Reputation: 1
If your on computer not available a user password, create an a administrator password. Then, you does on the Docker select shared driver. And write administrator password.
Upvotes: 0
Reputation: 523
Since I am using Docker for Windows, on the Docker icon if you right click and choose Settings, then Shared Drives, you want to make sure that the drive you are using is shared. But also there is an example of how you'd do a bind mount right beneath there.
In the terminal you can run the example:
docker run --rm -v c:/Users:/data alpine ls /data
That 'c:/Users:/data' is the way of writing path files for bind mounts in Docker for Windows (as of version 17.12.0-ce-win47).
That same way of writing paths is how you'd write it in the docker-compose.yaml file. If you open up Kitematic the volume still shows up with '/host_mnt' text, but that is OK and it's supposed to.
Upvotes: 5