I have created one docker image having apache in it. While running that image into container apache root process is running as
root and child processes are running as
One docker volume (VOLUME defined in Dockerfile) gets created as
/app/cache/example which is configured as docroot in apache.
Apache running in container actually rendering data from one of backend http endpoint and caching static assets in apache docroot.
But issue is apache is not able to write static assets into the docker volume permission denied issue is coming into the logs and hence all requests are going to backend http endpoint.
For resolving this issue, i have followed below approaches, but unfortunately no luck till now:
changed the ownership of volume at both sides host and container with
www-data. Both host and container having this
www-datauser with same info like username, uid, shell etc..
777at both host and container side.
Even followed the below one in Dockerfile:
RUN useradd foo RUN mkdir /data && touch /data/x RUN chown -R foo:foo /data VOLUME /data
Need help of experts to resolve this issue.