The Permission Problem of Docker Multi-Container Collaboration Sharing volume

  docker, question

Let’s go to the previous structural diagram.
clipboard.png
Then the current situation is visitingLocal 8080 portTo visitPort 80 of tengine container
http://x.x.x.x:8080/index.html
Can be accessed normally
http://x.x.x.x:8080/index.php
Phpfpm containerShow log:

172.17.0.3 -  12/Nov/2015:08:57:00 +0000 "GET /index.php" 404
 172.17.0.3 -  12/Nov/2015:08:57:00 +0000 "GET /index.php" 404
 172.17.0.3 -  12/Nov/2015:08:57:00 +0000 "GET /index.php" 404

Display 404. Unable to access the page, then I think it may be a permission issue.
[EnterTengine container
clipboard.png
[EnterPhpfpm container

clipboard.png

I used it directlyphp:5.5.30-fpmThe image of thePhpfpm containerRun up
Phpfpm containerThe/usr/local/etc/php-fpm.confI read the documents

user = www-data
 group = www-data

Here comes the key question:
I am herePhpfpm containerusefulchown -R www-data:www-data /data/sitesAfter the order,
/data/sitesThe owner of all the files below is still staff.
1. Why can’t I change the owner of the volume lock hanging in the directory? When I need to build images, I need to change the permissions and then mount it?
2、staffWhat the hell is this?

Volume’s permissions depend on how the host is given, if you want tophpfpmFolderwww-data:www-dataPermission to execute in your host mount directorychown -R www-data:www-data /data/sitesJust.