-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
59 lines (44 loc) · 1.47 KB
/
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
47
48
49
50
51
52
53
54
55
56
57
58
59
FROM ubuntu:19.10
# set environment encoding and some base utils
ENV LANG C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
# set environment encoding and system dependencies
RUN apt-get update && apt-get install -y \
# system utils
wget curl git \
# tectonic deps
libfontconfig1-dev libgraphite2-dev libharfbuzz-dev libicu-dev libssl-dev zlib1g-dev \
# python and libxml
libxml2-dev libxslt-dev python3.7-dev python3-pip
# texlive install
RUN apt-get install -y xzdec texlive-full latexmk
# texlive update and install reledmac
RUN tlmgr init-usertree
RUN tlmgr option repository http://mirror.ctan.org/systems/texlive/tlnet
RUN tlmgr update --self
RUN tlmgr install reledmac
# Manual install libertine
RUN wget http://mirrors.ctan.org/install/fonts/libertine.tds.zip
WORKDIR /texmf
RUN unzip /libertine.tds.zip
RUN texhash
RUN updmap --user --enable Map=libertine.map
# # Install rust
# RUN curl -f -L https://static.rust-lang.org/rustup.sh -O \
# && sh rustup.sh -y
# # Install tectonic
# RUN $HOME/.cargo/bin/cargo install tectonic
# Java
RUN apt-get install -y default-jre
# App directory and install
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Create necessary dirs that are excluded via .gitignore
RUN mkdir upload static static/output logs cache
# Copy in the app content
COPY requirements.txt /usr/src/app/
RUN pip3 install --no-cache-dir -r requirements.txt
COPY . /usr/src/app
COPY texmf/ /root/texmf
EXPOSE 80
CMD gunicorn -w 1 -b 0.0.0.0:5000 app:app