From c2f3204e49fcd93e5b283f787310f0d2b4365979 Mon Sep 17 00:00:00 2001 From: ildyria Date: Mon, 12 May 2025 11:45:36 +0200 Subject: [PATCH 1/3] change imagick configuration to allow pdf processing --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 02c15f9..c13697b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,6 +18,9 @@ ARG COMPOSER_NO_DEV=1 # This is NOT compatible with the release target above ARG BRANCH=master +# https://stackoverflow.com/questions/53377176/change-imagemagick-policy-on-a-dockerfile +ARG IMAGEMAGIC_CONFIG=/etc/ImageMagick-6/policy.xml + # Install base dependencies, add user and group, clone the repo and install php libraries RUN \ set -ev && \ @@ -57,10 +60,12 @@ RUN \ webp \ cron \ composer \ + ghostscript \ unzip && \ addgroup --gid "$PGID" "$USER" && \ adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \ cd /var/www/html && \ + if [ -f "$IMAGEMAGIC_CONFIG" ] ; then sed -i 's///g' $IMAGEMAGIC_CONFIG ; else echo "did not see file $IMAGEMAGIC_CONFIG" ; fi && \ if [ "$TARGET" = "release" ] ; then RELEASE_TAG="-b v$(curl -s https://raw.githubusercontent.com/LycheeOrg/Lychee/master/version.md)" ; \ elif [ "$BRANCH" != "master" ] ; then RELEASE_TAG="-b $BRANCH" ; fi && \ git clone --depth 1 $RELEASE_TAG https://github.com/LycheeOrg/Lychee.git && \ From fc177655c8ce71abf2232952764d3c150a59e304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20Viguier?= Date: Mon, 12 May 2025 22:36:33 +0200 Subject: [PATCH 2/3] Update Dockerfile Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com> --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c13697b..10212e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -65,7 +65,7 @@ RUN \ addgroup --gid "$PGID" "$USER" && \ adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \ cd /var/www/html && \ - if [ -f "$IMAGEMAGIC_CONFIG" ] ; then sed -i 's///g' $IMAGEMAGIC_CONFIG ; else echo "did not see file $IMAGEMAGIC_CONFIG" ; fi && \ + sed -i 's///g' /etc/ImageMagick-6/policy.xml && \ if [ "$TARGET" = "release" ] ; then RELEASE_TAG="-b v$(curl -s https://raw.githubusercontent.com/LycheeOrg/Lychee/master/version.md)" ; \ elif [ "$BRANCH" != "master" ] ; then RELEASE_TAG="-b $BRANCH" ; fi && \ git clone --depth 1 $RELEASE_TAG https://github.com/LycheeOrg/Lychee.git && \ From 6b1755400f1d43ab72236d5b58e8dd581f937f5f Mon Sep 17 00:00:00 2001 From: ildyria Date: Mon, 12 May 2025 22:37:46 +0200 Subject: [PATCH 3/3] WRTC --- Dockerfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 10212e3..c35ddfb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,9 +18,7 @@ ARG COMPOSER_NO_DEV=1 # This is NOT compatible with the release target above ARG BRANCH=master -# https://stackoverflow.com/questions/53377176/change-imagemagick-policy-on-a-dockerfile -ARG IMAGEMAGIC_CONFIG=/etc/ImageMagick-6/policy.xml - +# https://stackoverflow.com/questions/53377176/change-imagemagick-policy-on-a-dockerfile (for the sed on policy.xml) # Install base dependencies, add user and group, clone the repo and install php libraries RUN \ set -ev && \