docker-compose up 时提示挂载目录open permission denied
[root@localhost nginx-php]
Creating php-fpm ...
Creating php-fpm ... done
Creating nginx ...
Creating nginx ... done
Attaching to php-fpm, nginx
php-fpm | [15-Dec-2017 06:53:36] NOTICE: fpm is running, pid 1
php-fpm | [15-Dec-2017 06:53:36] NOTICE: ready to handle connections
nginx | nginx: [alert] could not open error log file: open() "/var/log/nginx/error.log" failed (13: Permission denied)
nginx | 2017/12/15 06:53:36 [emerg] 1
nginx exited with code 1
^CGracefully stopping... (press Ctrl+C again to force)
Stopping php-fpm ... done
[root@localhost nginx-php]
原因是SELinux搞的鬼,禁用就好了
/usr/sbin/sestatus -v
setenforce 0
vim /etc/selinux/config