Docker: 解决Centos 7中Permission Denied的问题

当用docker -v挂载volume后,会出现Permission Denied的问题,这有时是因为SeLinux导致的。解决方法如下:

chcon -Rt svirt_sandbox_file_t /path/to/volume

有时候会遇到chcon: can't apply partial context to unlabeled file的错误,这时候需要运行如下命令:
chcon -h system_u:object_r:xxxx_t:s0 /mnt/xxxx
原文地址:https://www.cnblogs.com/ilovewindy/p/6042260.html