Run Open Webui container as non ROOT user #18541
-
|
I'm trying to run this service in a EKS cluster, right now the container is built to be run as ROOT user which isn't a best practice for security reason. If I try to start the container with a different UID and GUID I get an error on startup because it cannot generate a random I could re-build the image passing the args UID and GUID but I think is not the correct approach since the container itself should follow common best practices. What do you suggest? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
OpenWebUI does not seem to offer a rootless image right now, see #17583 (comment) What is working for me at the moment is something like this: Before 0.8.0 the following was enough: I really believe the project should start offering a rootless image out of the box. Adapting existing images is easy enough for now, but already inconsistent from version to version. |
Beta Was this translation helpful? Give feedback.
A better approach to what I have wrote earlier is to use the "native" OpenWebUI Docker file arguments UID and GID to build a custom image:
open-webui/Dockerfile
Lines 23 to 24 in b8112d7
This ensures the user and group are actually created, permissions are set and so on...
According to the Dockerfile, this approach is not officially supported, but it seems to be working in practices, at least on my installation.