diff options
-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 |