2021-10-10 17:51:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -xeuo pipefail
|
|
|
|
IFS=$'\n\t'
|
|
|
|
|
2023-07-19 12:12:31 +00:00
|
|
|
if [[ -x "$(command -v podman)" ]]; then
|
|
|
|
CONTAINER_RUNTIME="$(command -v podman 2> /dev/null)"
|
|
|
|
elif [[ -x "$(command -v docker)" ]]; then
|
|
|
|
CONTAINER_RUNTIME="$(command -v docker 2> /dev/null)"
|
2021-10-10 17:51:12 +00:00
|
|
|
else
|
|
|
|
echo "Container runtime (docker/podman) not found!"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2023-10-11 19:55:03 +00:00
|
|
|
export APACHE_RUN_USER=33
|
|
|
|
export APACHE_RUN_GROUP=0
|
|
|
|
|
|
|
|
$CONTAINER_RUNTIME exec --user "${APACHE_RUN_USER}:${APACHE_RUN_GROUP}" nextcloud bash -c 'cd /var/www/html/custom_apps/upschooling && make test'
|