Merge pull request #4048 from nextcloud/enh/4042/inverse-imagemagick

inverse the addition of imagemagick by deleting it if it was not added
This commit is contained in:
Simon L 2024-01-17 09:48:40 +01:00 committed by GitHub
commit c75c3a052a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View file

@ -191,6 +191,7 @@ RUN set -ex; \
grep \ grep \
nodejs \ nodejs \
bind-tools \ bind-tools \
imagemagick \
coreutils; \ coreutils; \
\ \
grep -q '^pm = dynamic' /usr/local/etc/php-fpm.d/www.conf; \ grep -q '^pm = dynamic' /usr/local/etc/php-fpm.d/www.conf; \

View file

@ -54,6 +54,10 @@ sudo -u www-data rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file"
# Install additional dependencies # Install additional dependencies
if [ -n "$ADDITIONAL_APKS" ]; then if [ -n "$ADDITIONAL_APKS" ]; then
if ! [ -f "/additional-apks-are-installed" ]; 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" read -ra ADDITIONAL_APKS_ARRAY <<< "$ADDITIONAL_APKS"
for app in "${ADDITIONAL_APKS_ARRAY[@]}"; do for app in "${ADDITIONAL_APKS_ARRAY[@]}"; do
echo "Installing $app via apk..." echo "Installing $app via apk..."