【发布时间】:2022-08-16 23:56:37
【问题描述】:
这是一个简单的虚拟 docker-compose :
version: \'2.4\'
services:
webserver:
image: \"webserver:latest\" // apache, nginx, caddy, whatever
volumes:
- \"shared_storage:/app/storage/shared\"
analyser:
image: \"custom:latest\" // any custom script doing stuff on a volume
volumes:
- \"shared_storage:/local/storage/shared\"
volumes:
shared_storage
问题是,shared_storage 由root 拥有,权限为644(或我可以使用user: 设置的任何用户),但网络服务器在内部以www-data 用户身份运行(我不知道提前身份证)。
如何授予网络服务器访问 shared_storage 卷的权限?
干杯
标签: docker docker-compose