Marvin Heemeyer
Marvin Heemeyer

Reputation: 153

Docker mount host volume Windows

I'm using Windows 10 and Docker version 18.03.1-ce, build 9ee9f40.

I'm trying to do docker run -it --volume="./Users:/app" ubuntu:16.04 or docker run -it -v Users:/app ubuntu:16.04 but it's not working, my directory in Docker still empty.

I have read this post and it doesn't help.

UPD: Solved.

Important step was to go to Docker Settings > Shared Drives and uncheck and check your shared drive again.

Then you can mount your volume like this:
docker run -v /host_mnt/c/Users/User/Path:/docker/path image

Upvotes: 0

Views: 1280

Answers (2)

Blue Clouds
Blue Clouds

Reputation: 8161

This command should fix it .

docker run -it -v ${PWD}:/app ubuntu:16.04

Not sure what error you got, so I am assuming

  • your host directory may not be correct.(solution is based on this)
  • Permission issue.

Upvotes: 2

Please check the permissions of your folders and user permission

Upvotes: 0

Related Questions