How to mount volume to docker on OSX?
Asked Answered
C

2

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

Chilton answered 11/10, 2019 at 13:2 Comment(2)
Also, you have overlapping directories. I suggest only exporting /Users/username directories and avoid /UsersLarissa
1. the result doesn't depend by the last backslash 2. overlapping dir was the attempt solving the problemChilton
L
1

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

Larissa answered 18/10, 2019 at 7:42 Comment(0)
C
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.

Clapboard answered 11/12, 2020 at 20:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.