From e636e93c866b000ae4674605ea0543930c7e2e99 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 14 Nov 2024 10:05:22 +0000 Subject: Ensuring the image processing cli tools are in the Dockerfile --- Dockerfile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fc62fba..d94bea5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,13 @@ WORKDIR /rails # Install base packages RUN apt-get update -qq && \ - apt-get install --no-install-recommends -y curl libjemalloc2 libvips sqlite3 && \ + apt-get install --no-install-recommends -y \ + curl \ + libjemalloc2 \ + libvips \ + sqlite3 \ + ghostscript \ + imagemagick && \ rm -rf /var/lib/apt/lists /var/cache/apt/archives # Set production environment @@ -70,3 +76,7 @@ ENTRYPOINT ["/rails/bin/docker-entrypoint"] # Start server via Thruster by default, this can be overwritten at runtime EXPOSE 80 CMD ["./bin/thrust", "./bin/rails", "server"] + +# Configure ImageMagick to allow PDF processing +RUN sed -i '/disable ghostscript format types/,+6d' /etc/ImageMagick-6/policy.xml && \ + sed -i 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml -- cgit v1.2.3