码迷,mamicode.com
首页 > 其他好文 > 详细

docker ls: cannot open directory .: Permission denied

时间:2015-05-29 23:03:30      阅读:446      评论:0      收藏:0      [点我收藏+]

标签:

From access.redhat.com:Sharing_Data_Across_Containers:

" Host volume settings are not portable, since they are host-dependent and might not work on any other machine. For this reason, there is no Dockerfile equivalent for mounting host directories to the container. Also, be aware that the host system has no knowledge of container SELinux policy. Therefore, if SELinux policy is enforced, the mounted host directory is not writable to the container, regardless of the rw setting. Currently, you can work around this by assigning the proper SELinux policy type to the host directory":

~]# chcon -Rt svirt_sandbox_file_t host_dir.

Where host_dir is a path to the directory on host system that is mounted to the container.

It‘s seems to be only a workaround but i tried and it works

docker ls: cannot open directory .: Permission denied

标签:

原文地址:http://www.cnblogs.com/gibbon/p/4539511.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!