-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.base
49 lines (40 loc) · 1.69 KB
/
Dockerfile.base
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM phusion/passenger-ruby25:1.0.2
RUN apt-get update -qq && \
apt-get install -y \
build-essential \
ghostscript \
imagemagick \
libpq-dev \
nodejs \
libreoffice \
libsasl2-dev \
netcat \
postgresql-client \
rsync \
tzdata \
unzip \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# If changes are made to fits version or location,
# amend `LD_LIBRARY_PATH` in docker-compose.yml accordingly.
RUN mkdir -p /opt/fits && \
curl -fSL -o /opt/fits/fits-latest.zip https://projects.iq.harvard.edu/files/fits/files/fits-1.3.0.zip && \
cd /opt/fits && unzip fits-latest.zip && chmod +X /opt/fits/fits.sh
RUN rm /etc/nginx/sites-enabled/default
COPY ops/webapp.conf /etc/nginx/sites-enabled/webapp.conf
COPY ops/env.conf /etc/nginx/main.d/env.conf
ENV APP_HOME /home/app/webapp
RUN mkdir $APP_HOME && chown -R app /home/app
WORKDIR $APP_HOME
ENV BUNDLE_GEMFILE=$APP_HOME/Gemfile \
BUNDLE_JOBS=4
COPY --chown=app Gemfile* $APP_HOME/
RUN /sbin/setuser app bundle install
COPY --chown=app . $APP_HOME
RUN /sbin/setuser app /bin/bash -l -c 'cd /home/app/webapp && DB_ADAPTER=nulldb bundle exec rake assets:precompile'
COPY ops/nginx.sh /etc/service/nginx/run
RUN chmod +x /etc/service/nginx/run
RUN rm -f /etc/service/nginx/down
# reenables pdfs in imagemagick see https://ubuntuforums.org/showthread.php?t=2403266
RUN sed -i '/PDF/s/none/read|write/' /etc/ImageMagick-6/policy.xml