diff options
author | Matthew Lemon <y@yulqen.org> | 2024-11-14 10:05:22 +0000 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-11-14 10:05:22 +0000 |
commit | e636e93c866b000ae4674605ea0543930c7e2e99 (patch) | |
tree | 9d6348a1613493ddd8d66086e65c1717cb1215ba | |
parent | 2b90e22a23ac093b9f268a8709867c565604eb52 (diff) |
Ensuring the image processing cli tools are in the Dockerfile
-rw-r--r-- | Dockerfile | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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 |