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

后端 未结 7 790
無奈伤痛
無奈伤痛 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:11

    As an example, using Portainer, this command works for me:

    docker run -d --restart unless-stopped -p 9000:9000 \
     -v /var/run/docker.sock:/var/run/docker.sock \
     -v /var:/data portainer/portainer --no-auth
    

    But, if I vary the -v /var:/data at all, it won't work. I think (but not sure) that its because Docker is trying to do a mkdir. So, if I try to mount -v /var/whatever:/data, mkdir fails because not enough permission, and it doesn't work.

    I have 2 Mac's (High Sierra) and I tried it on both. Same problem. Also, I tried using Docker Beta channel. I think I understand Dan Lowe's answer: I'll update this answer if that works for me.

提交回复
热议问题