From d045a004535c7e0232e72f9b611ea2c47fd99cd5 Mon Sep 17 00:00:00 2001 From: Simon L Date: Fri, 12 Jan 2024 16:32:18 +0100 Subject: [PATCH] inverse the addition of imagemagick by deleting it if it was not added Signed-off-by: Simon L --- Containers/nextcloud/Dockerfile | 1 + Containers/nextcloud/start.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index dfe06d5f..9059b933 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -191,6 +191,7 @@ RUN set -ex; \ grep \ nodejs \ bind-tools \ + imagemagick \ coreutils; \ \ grep -q '^pm = dynamic' /usr/local/etc/php-fpm.d/www.conf; \ diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 1e74ea23..a9137847 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -54,6 +54,10 @@ 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 + # Allow to disable imagemagick without having to download it each time + if ! echo "$ADDITIONAL_APKS" | grep -q imagemagick; then + apk del imagemagick; + fi read -ra ADDITIONAL_APKS_ARRAY <<< "$ADDITIONAL_APKS" for app in "${ADDITIONAL_APKS_ARRAY[@]}"; do echo "Installing $app via apk..."