I have got multiple containers running on a server and I am getting the same issue with 2 of them when I try to map a physical drive location to a container internal location so the data is stored where I want it to be and not in /.
I have chased this in circles with the people who made the container and they have even made changes to their docker to try to solve my issue but we have hit a dead end.
Running CentOS 7.5 and whatever the latest docker is in the repos.
the issue I have is Nginx spits out permission issues for the bound directories and the container shuts itself down. I have myself tried changing ownership to root, dockerroot and nginx to no avail and they have tried to include scripts in their container that should do this from inside the container, also to no avail. but this problem doesn’t exist if I just let the container make 2 logical volumes to mount to these locations.
I suspect there might be permissions issues within docker itself but I don’t know what to look up or how to do it yet.
I am extremely new to docker and so far think it is going to be very useful as I explore more options with it but right now it’s crucial I solve this issue as I have an agreement to get all this working for someone and right now this permissions issue is the only thing preventing me from completing the job.