Fix user and group creation for docker containers

This commit is contained in:
zeke 2024-02-07 10:47:36 -08:00 committed by Zeke Roa
parent 57a6154287
commit 17820b31c4
3 changed files with 6 additions and 14 deletions

View file

@ -1,12 +1,5 @@
#!/bin/sh
# not exactly elegant, but one container is Debian, the other is Alpine
if [ "$1" == "php" ]; then
useradd -MU leftypol
else
addgroup leftypol
adduser -DHG leftypol leftypol
fi
set -eu
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol
@ -32,9 +25,3 @@ ln -s /code/templates/* /var/www-leftypol/templates/
install -m 775 -o leftypol -g leftypol -d /var/www-leftypol/inc
ln -s /code/inc/* /var/www-leftypol/inc/
if [ "$1" = "php" ]; then
ln -s /code/composer.json /code/composer.lock /var/www-leftypol/ \
cd /var/www
composer install
fi