mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-02-03 22:24:19 +01:00
Expose build args to container which allow the web service
to run as given uid:gid.
By default, this behavior is "off". Building via docker compose still
defaults to root:root on everything. Unless these args are explicitly
set, no users should notice a difference.
Build arguments are also exposed as Docker environment variables, so they can
be freely referenced in the `entrypoint.sh`
Output files will be owned by PUID and PGID, so if set, no more root:root
images (unless desired).
New arguments:
- ARG PUID=0
- ARG PGID=0
- ARG USER_HOME=/root
New environment variable:
- RSYNC_FLAGS
- NFS share doesn't like `-a` changing every bit on a directory
Example docker-compose.override.yaml using these flags
```
version: '3.9'
services:
auto:
environment:
RSYNC_FLAGS: -vrlgotO
build:
args:
USER_HOME: /opt/stablediffusion
PUID: 1000
PGID: 1002
volumes:
- /media/data:/data
- /tmp:/output
download:
volumes:
- /media/data:/data
```
|
||
|---|---|---|
| .. | ||
| clone.sh | ||
| config.py | ||
| Dockerfile | ||
| entrypoint.sh | ||
| info.py | ||