InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

[Docker] Container permissions

Open SchrodingersGat opened this issue 1 year ago • 1 comments

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 Dockerfile to address this?
  • What about other containers which store data (postgres / caddy)

SchrodingersGat avatar Feb 27 '24 12:02 SchrodingersGat

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

oddstr13 avatar Mar 13 '24 20:03 oddstr13