7

I have a problem mounting a host machine volume to a docker image. I've added a folder to docker File sharing settings, but it doesn't get any effect. What do I have to do to solve the problem?

For example, I try to mount a volume which was added to File sharing settings in Docker Desktop, but I get permission denied error

~$ docker run --rm -it -v /Users/:/vm-root alpine ls -l /vm-root
docker: Error response from daemon: Mounts denied: EOF.
ERRO[0000] error waiting for container: context canceledenter code here

Docker Desktop Screenshot:

Volume already added to file sharing settings in docker desktop

robsiemb
  • 6,157
  • 7
  • 32
  • 46
Mikhail
  • 71
  • 1
  • 3

2 Answers2

1

You have overlapping directories. I suggest only exporting /Users/username directories and avoid /Users

Richard Barber
  • 5,257
  • 2
  • 15
  • 26
1

Solution prvided by François Alexandre Docker: Mounts denied. The paths ... are not shared from OS X and are not known to Docker

With the new version 3.0.0 of Docker for mac, you need to disable use gRPC FUSE for file sharing in Preferences>Experimental Features.

BrianC
  • 1,793
  • 1
  • 18
  • 26