Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.

Commit 61d1eea

Browse files
ildyriad7415
andauthored
Change imagick configuration to allow pdf processing (#225)
* change imagick configuration to allow pdf processing * Update Dockerfile Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com> * WRTC --------- Co-authored-by: Martin Stone <1611702+d7415@users.noreply.github.com>
1 parent 358e83c commit 61d1eea

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ ARG COMPOSER_NO_DEV=1
1818
# This is NOT compatible with the release target above
1919
ARG BRANCH=master
2020

21+
# https://stackoverflow.com/questions/53377176/change-imagemagick-policy-on-a-dockerfile (for the sed on policy.xml)
2122
# Install base dependencies, add user and group, clone the repo and install php libraries
2223
RUN \
2324
set -ev && \
@@ -57,10 +58,12 @@ RUN \
5758
webp \
5859
cron \
5960
composer \
61+
ghostscript \
6062
unzip && \
6163
addgroup --gid "$PGID" "$USER" && \
6264
adduser --gecos '' --no-create-home --disabled-password --uid "$PUID" --gid "$PGID" "$USER" && \
6365
cd /var/www/html && \
66+
sed -i 's/<policy domain="coder" rights="none" pattern="PDF" \/>/<policy domain="coder" rights="read|write" pattern="PDF" \/>/g' /etc/ImageMagick-6/policy.xml && \
6467
if [ "$TARGET" = "release" ] ; then RELEASE_TAG="-b v$(curl -s https://raw.githubusercontent.com/LycheeOrg/Lychee/master/version.md)" ; \
6568
elif [ "$BRANCH" != "master" ] ; then RELEASE_TAG="-b $BRANCH" ; fi && \
6669
git clone --depth 1 $RELEASE_TAG https://github.com/LycheeOrg/Lychee.git && \

0 commit comments

Comments
 (0)