-
Notifications
You must be signed in to change notification settings - Fork 11
/
Dockerfile
68 lines (66 loc) · 2.04 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
60
61
62
63
64
65
66
67
68
FROM ubuntu:20.04
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections && \
apt -qq update --fix-missing && \
apt -qq -y --no-install-recommends install \
apt-transport-https \
gnupg \
man-db \
software-properties-common \
wget && \
apt -qq update
RUN apt -q -y --no-install-recommends --fix-missing install \
antiword \
bzip2 \
cron \
curl \
# emacs-nox \
file \
g++ \
gcc \
git \
imagemagick \
libfontconfig1-dev \
libjpeg-dev \
liblcms2-dev \
libopenjp2-7-dev \
libreoffice \
libtiff-dev \
libtiff-tools \
libxml2-dev \
libxslt1-dev \
locales \
make \
pkg-config \
procps \
python3-dev \
python3-venv \
# silversearcher-ag \
tesseract-ocr \
tesseract-ocr-swe \
uwsgi \
uwsgi-plugin-python3 \
xz-utils \
zlib1g-dev && \
wget https://poppler.freedesktop.org/poppler-0.56.0.tar.xz && \
xz -d poppler-0.56.0.tar.xz && \
tar xvf poppler-0.56.0.tar && \
cd poppler-0.56.0 && \
./configure && \
make install && \
cd .. && \
rm -r poppler-0.56.0 && \
ldconfig && \
wget https://github.com/htacg/tidy-html5/releases/download/5.4.0/tidy-5.4.0-64bit.deb && \
dpkg -i tidy-5.4.0-64bit.deb
WORKDIR /usr/share/ferenda
COPY requirements.txt .
RUN python3 -m venv /usr/share/.virtualenv && \
/usr/share/.virtualenv/bin/pip install wheel && \
/usr/share/.virtualenv/bin/pip install -r requirements.txt
EXPOSE 8080
COPY docker/ferenda /tmp/docker
RUN mv /tmp/docker/locale.gen /etc/locale.gen && locale-gen && \
chmod +x /tmp/docker/build && mv /tmp/docker/build /usr/local/bin/build
COPY . .
ENTRYPOINT ["/bin/bash", "/tmp/docker/setup.sh"]
CMD ["/usr/share/.virtualenv/bin/gunicorn", "--bind=0.0.0.0:8000", "--access-logfile", "-", "--error-logfile", "-", "--workers=5", "--chdir=/usr/share/site", "wsgi:application"]