MAC Docker Error response from daemon: Mounts denied

(base) ➜  UTF docker start 913
Error response from daemon: Mounts denied:
The path /var/mediawiki/mysql
is not shared from OS X and is not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.

解决:

原来的写法:-v /var/mediawiki/images:/images

替换为:-v /private/var/mediawiki/images:/images

 

/var in macOS is a symbolic link into /private. That is also true for /tmp:

$ ls -ld /tmp /var
lrwxr-xr-x@ 1 root  wheel  11 Jan 26 16:18 /tmp -> private/tmp
lrwxr-xr-x@ 1 root  wheel  11 Jan 26 16:18 /var -> private/var

参考:

https://stackoverflow.com/questions/45122459/docker-mounts-denied-the-paths-are-not-shared-from-os-x-and-are-not-known

 

posted @ 2020-05-19 07:08  船长博客  阅读(1525)  评论(1编辑  收藏  举报
永远相信美好的事情即将发生!