mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-13 01:00:16 +00:00
allow to add dependencies and php extensions into the Nextcloud container
Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
parent
63f568ef36
commit
da2b967a33
11 changed files with 83 additions and 5 deletions
|
|
@ -36,6 +36,34 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" ]; then
|
|||
fi
|
||||
sudo -u www-data rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file"
|
||||
|
||||
# Install additional dependencies
|
||||
if [ -n "$ADDITIONAL_APKS" ]; then
|
||||
if ! [ -f "/additional-apks-are-installed" ]; then
|
||||
read -ra ADDITIONAL_APKS_ARRAY <<< "$ADDITIONAL_APKS"
|
||||
for app in "${ADDITIONAL_APKS_ARRAY[@]}"; do
|
||||
apk add "$app"
|
||||
done
|
||||
fi
|
||||
touch /additional-apks-are-installed
|
||||
fi
|
||||
|
||||
# Install additional php extensions
|
||||
if [ -n "$ADDITIONAL_PHP_EXTENSIONS" ]; then
|
||||
if ! [ -f "/additional-php-extensions-are-installed" ]; then
|
||||
read -ra ADDITIONAL_PHP_EXTENSIONS_ARRAY <<< "$ADDITIONAL_PHP_EXTENSIONS"
|
||||
for app in "${ADDITIONAL_PHP_EXTENSIONS_ARRAY[@]}"; do
|
||||
if [ "$app" = imagick ]; then
|
||||
pecl install imagick-3.7.0
|
||||
docker-php-ext-enable imagick
|
||||
else
|
||||
pecl install "$app"
|
||||
docker-php-ext-enable "$app"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
touch /additional-php-extensions-are-installed
|
||||
fi
|
||||
|
||||
# Run original entrypoint
|
||||
if ! sudo -E -u www-data bash /entrypoint.sh; then
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue