refactor: Support running Docker container as root or non-root user

This commit introduces flexibility in the Docker setup by allowing the container to run either as the `root` user or a specified non-root user. It updates both the `docker-compose.yml` and `Dockerfile` to include environment variables for setting the user ID, group ID, username, and group name. Additionally, it modifies the entrypoint script to handle these configurations appropriately, ensuring compatibility with different user setups.
This commit is contained in:
Self Denial
2024-11-17 20:12:20 -07:00
parent c6b7d2f79a
commit 6834512594
3 changed files with 34 additions and 11 deletions

View File

@@ -45,6 +45,10 @@ services:
image: sd-comfy:7
environment:
- CLI_ARGS=
- USE_UID=0
- USE_GID=0
- USE_USER=root
- USE_GROUP=root
comfy-cpu: