forked from doubtfire-lms/doubtfire-deploy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpdfgen.Dockerfile
46 lines (35 loc) · 1.01 KB
/
pdfgen.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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# syntax=docker/dockerfile:1
FROM ruby:2.6.7-buster
ARG API_HOME=./doubtfire-api
ARG PDFGEN_HOME=./pdfGen
# Setup dependencies
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y \
ffmpeg \
ghostscript \
imagemagick \
libmagic-dev \
libmagickwand-dev \
libmariadb-dev \
python3-pygments \
tzdata \
cron
# Setup the folder where we will deploy the code
WORKDIR /doubtfire
# Install LaTex
COPY "$API_HOME"/.ci-setup /doubtfire/.ci-setup
RUN /doubtfire/.ci-setup/texlive-install.sh
# Install bundler
RUN gem install bundler -v 1.17.3
# Install the Gems
COPY "$API_HOME"/Gemfile "$API_HOME"/Gemfile.lock /doubtfire/
RUN bundle install --without passenger webserver
# Setup path
ENV PATH /tmp/texlive/bin/x86_64-linux:$PATH
# Copy doubtfire-api source
COPY "$API_HOME" /doubtfire/
# Crontab file copied to cron.d directory.
COPY "$PDFGEN_HOME"/entry_point.sh /doubtfire/
COPY "$PDFGEN_HOME"/crontab /etc/cron.d/container_cronjob
RUN touch /var/log/cron.log
CMD /doubtfire/entry_point.sh