Add option to set the docker user ID and group ID to the current user

This commit is contained in:
IV Desktop 2023-03-26 19:03:35 +03:00
parent 063665eae1
commit dbd992171f
2 changed files with 8 additions and 0 deletions

View file

@ -1,6 +1,7 @@
version: '3.9'
x-base_service: &base_service
user: "${USER_ID:-0:0}"
ports:
- "7860:7860"
volumes:

7
run.sh Executable file
View file

@ -0,0 +1,7 @@
#!/bin/bash
if [ "$#" -ne "1" ]
then
echo "usage: $ ./run.sh [ download | auto | auto-cpu | invoke | sygil | sygil-sl ]"
else
USER_ID=$(id -u):$(id -g) docker compose --profile $1 up --build
fi