InvenTree
InvenTree copied to clipboard
[Docker] Container permissions
currently the docker / docker compose setup runs with root permissions - this means that any external files are created under the root user.
- How to force run as a different user?
- Do we need to make any changes to the
Dockerfileto address this? - What about other containers which store data (postgres / caddy)
Setting the user in the compose file is not sufficient, attempting to access file //.gitconfig fails – I did not investigate any further.
Caddy will be needing at least capabilities NET_BIND_SERVICE in order to bind to the privileged ports 80 and 443, at least for older docker versions
inventree-server | error: could not lock config file //.gitconfig: Permission denied
inventree-worker | error: could not lock config file //.gitconfig: Permission denied