mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Apply file perms from env in entrypoint
This commit is contained in:
parent
cef4fac823
commit
0bacad0245
@ -51,4 +51,3 @@ EXPOSE 25500-25600
|
|||||||
USER crafty
|
USER crafty
|
||||||
ENTRYPOINT ["/commander/docker_launcher.sh"]
|
ENTRYPOINT ["/commander/docker_launcher.sh"]
|
||||||
CMD ["-v", "-d", "-i"]
|
CMD ["-v", "-d", "-i"]
|
||||||
|
|
||||||
|
@ -6,6 +6,15 @@ if [ ! "$(ls -A ./app/config)" ]; then
|
|||||||
cp -r ./app/config_original/* ./app/config/
|
cp -r ./app/config_original/* ./app/config/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Set user/group permissions to env or default to image root
|
||||||
|
groupmod -g "${PGID}" -o crafty
|
||||||
|
sed -i -E "s/^(crafty:x):[0-9]+:[0-9]+:(.*)/\\1:$PUID:$PGID:\\2/" /etc/passwd
|
||||||
|
|
||||||
|
# Apply new permissions taken from env over working dirs
|
||||||
|
chown -R crafty:crafty \
|
||||||
|
/commander/ \
|
||||||
|
/commander-venv/
|
||||||
|
|
||||||
# Activate our prepared venv and launch crafty with provided args
|
# Activate our prepared venv and launch crafty with provided args
|
||||||
. /commander-venv/bin/activate
|
. /commander-venv/bin/activate
|
||||||
exec python3 main.py $@
|
exec python3 main.py $@
|
||||||
|
Loading…
Reference in New Issue
Block a user