I’ve been scouring the forums and looking through a lot of posts, trying out the commands I’ve seen from other people but I do not get the results that they do. I have no idea what I’m doing run. I’ll share the link I’m getting a lot of commands from Volume mounts in windows does not work
When I run docker run -v c:/Users:/data alpine ls /data or any combination of -v … I get the errors C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: invalid bind mount spec "c:/Users:/data": invalid volume specif ication: 'c:\Users:\data'. See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.
So I cannot figure out what’s happening that’s wrong but I cannot bind any volume in so many ways I’ve tried.
It’s just a syntax problem. The colon : character is already reserved as the delimiter between the host directory and guest directory when you use run -v. So you can either leave out the host drive letter and just specify the host path as /Users, or use the alternative syntax of /c/Users. Then you will only have one : character in your -v and you won’t confuse docker.