Bash into your container:
> docker-compose run
cd into the location that has your mounted volume and do a "ls -l", you may see the following:
drwxr-xr-x 1 1000 staff 646 Jun 15 03:39 app
In Nginx or Apache, the user is usually www-data. We need to associate www-data with the UID 1000.
In your Dockerfile, add the following:
> RUN usermod -u 1000 www-data
Now if you check the permission again, you would see the correct user.
drwxr-xr-x 1 www-data staff 646 Jun 15 03:39 app
No comments:
Post a Comment