-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
executable file
·25 lines (19 loc) · 979 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM trmccormick/hydra_docker_build:ruby2.7
ENV RAILS_ENV production
ENV RACK_ENV production
WORKDIR /home/hydra
ADD ./hydra /home/hydra
RUN apt-get update && apt-get -y install imagemagick ghostscript
# Use JEMALLOC instead
# JEMalloc is a faster garbage collection for Ruby.
# -------------------------------------------------------------------------------------------------
RUN apt-get install -y libjemalloc2
ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libjemalloc.so.2
# increase ImageMagick's memory limit
RUN sed -i -E 's/name="disk" value=".+"/name="disk" value="4GiB"/g' /etc/ImageMagick-6/policy.xml
# Modifiy ImageMagick's security policy to allow reading and writing PDFs
RUN sed -i 's/policy domain="coder" rights="none" pattern="PDF"/policy domain="coder" rights="read|write" pattern="PDF"/' /etc/ImageMagick-6/policy.xml
RUN \
# gem update --system --quiet && \
bundle config set --local without 'development test' && \
bundle install --jobs=4 --retry=3