-
Notifications
You must be signed in to change notification settings - Fork 67
/
Dockerfile
64 lines (53 loc) · 1.51 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
FROM python:3.6-slim-buster
# ensure unoconv can locate the uno library
ENV PYTHONPATH /usr/lib/python3/dist-packages
RUN usermod -d /home www-data \
&& chown www-data:www-data /home \
# -slim images strip man dirs, but java won't install unless this dir exists.
&& mkdir -p /usr/share/man/man1 \
&& apt-get update \
# HACK: work around bug in install java (dep of libreoffice)
&& apt-get install -y ca-certificates-java \
# mfr dependencies
&& apt-get install -y \
git \
make \
gcc \
build-essential \
gfortran \
r-base \
libblas-dev \
libevent-dev \
libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libtiff5-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
gnupg2 \
# convert .step to jsc3d-compatible format
freecad \
# pspp dependencies
pspp \
# unoconv dependencies
libreoffice \
# grab gosu for easy step-down from root
gosu \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /code
WORKDIR /code
RUN pip install -U pip==18.1
RUN pip install setuptools==37.0.0
RUN pip install unoconv==0.8.2
COPY ./requirements.txt /code/
RUN pip install --no-cache-dir -r ./requirements.txt
# Copy the rest of the code over
COPY ./ /code/
ARG GIT_COMMIT=
ENV GIT_COMMIT ${GIT_COMMIT}
RUN python setup.py develop
EXPOSE 7778
CMD ["gosu", "www-data", "invoke", "server"]