GeekZoneHQ / web

Software to power the Geek.Zone website and apps
http://geek.zone/web
GNU General Public License v3.0
19 stars 29 forks source link

Files and folders in /usr/src/app directory in the app container belong to root user #485

Open giulio-giunta opened 2 years ago

giulio-giunta commented 2 years ago

What did you expect?

Those files and folders should belong to "django" user and the permissions on them should reflect the Dockerfile.

What actually happened?

The ownership and permissions on those files is set before the files are actually copied from the local project folder to the container file system, thus they apply to nothing. The order of instructions in the Dockerfile is wrong.

Impact

Low

Urgency

Now

What browsers are you seeing the problem on?

No response

What operating system are you using?

Linux

Relevant log output

No response

Code of Conduct

giulio-giunta commented 2 years ago

Adding a volume in docker-compose causes the ownership and permission of the files and folders in the app container to change. For this reason is better to have 2 docker-compose files: