Docker: Mounts denied. The paths … are not shared from OS X and are not known to Docker

后端 未结 7 802
無奈伤痛
無奈伤痛 2020-11-29 22:44

The command docker run -v /var/folders/zz/... produces the following error.

docker: Error response from daemon: Mounts denied: 
The paths /var/f         


        
7条回答
  •  感情败类
    2020-11-29 23:04

    As an alternative solution:

    Change the path from /private/instance1-data:/home to ./instance1-data:/home

    In the *nix land and hence, Docker, the . indicates the current directory. Since macOS is picky ang getting even pickier about sandboxing, this seems like a viable solution for macOS. Just create the folder needed for instance1 in the same directory.

    Another advantage of this solution is that it removes the need to run docker-compose with sudo. Regardless, it causes no harm in this case but still, that's a plus.

提交回复
热议问题