今天在两台电脑上执行这个命令时,都遇到了这个错误,无法创建容器,原因是file sharing has been cancelled,经过请教身边的大神及网上百度,终于搞清楚是docker在挂载文件时,文件分享权限不够.
问题截图:

解决方法:开启docker共享文件夹,点击电脑任务栏右下角docker图标->settings->resources->file sharing,点击默认目录后面的加号,把自己本机docker目录添加上去

注:报cannot create container的原因不一定是因为file sharing,需要重点看错误返回的message

网友评论