mirror of
https://github.com/open-webui/open-webui.git
synced 2026-03-22 14:13:08 -05:00
[PR #2322] [MERGED] feat: optional UID/GID docker build args #7757
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/2322
Author: @cheahjs
Created: 5/17/2024
Status: ✅ Merged
Merged: 5/17/2024
Merged by: @tjbck
Base:
dev← Head:feat/unsupported-nonroot-images📝 Commits (1)
1dc8078feat: optional UID/GID docker build args📊 Changes
1 file changed (+22 additions, -5 deletions)
View changed files
📝
Dockerfile(+22 -5)📄 Description
Pull Request Checklist
devbranch.Description
Adds two new build args
UIDandGIDto set the user and group ID of the files in container and to run as that user. This is added with a note that non-root configurations are untested.To build as non-root:
docker build --build-arg UID=1000 --build-arg GID=1000 --tag=open-webui:nonroot .This is a no-op change in the default root configuration, which is why
$HOMEis still set to/root. We can't switch to nonroot by default, as this breaks existing users (and we have enough support requests around Docker usage as it is already, and we encourage users to setup Watchtower for automatic updates). We also don't build nonroot containers in CI because we're already running into total concurrency quotas on GitHub Actions. Adding a nonroot variant to the build matrix increases the number of tags from 3 to 6, and the total number of images from 6 to 12.Test docker build: https://github.com/cheahjs/open-webui-fork/actions/runs/9121520626
Addresses https://github.com/open-webui/open-webui/discussions/1698 and https://github.com/open-webui/open-webui/discussions/1021
Prior attempts: https://github.com/open-webui/open-webui/pull/1533 https://github.com/open-webui/open-webui/pull/2316
Tested locally with base, bundled ollama, and CUDA.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.