-
Notifications
You must be signed in to change notification settings - Fork 13
/
Dockerfile
37 lines (23 loc) · 1.18 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
FROM python:2.7.17-alpine3.9
WORKDIR /app
ENV PYTHONPATH $PYTHONPATH:/app
COPY requirements.txt /app/requirements.txt
RUN apk --update add build-base gfortran pkgconfig python-dev openblas-dev freetype-dev libpng-dev libxml2-dev libxslt-dev libffi-dev openssl-dev mongodb \
&& ln -s /usr/include/locale.h /usr/include/xlocale.h \
&& pip install --cache-dir=/tmp/pipcache --upgrade setuptools pip \
&& pip install --cache-dir=/tmp/pipcache numpy==1.7.1 \
&& pip install --cache-dir=/tmp/pipcache matplotlib==1.5.3 pystache==0.5.3 Wand==0.4.4 \
&& pip install --cache-dir=/tmp/pipcache --requirement /app/requirements.txt \
&& rm -r /tmp/pipcache \
&& apk del build-base gfortran pkgconfig \
&& rm -r /var/cache/apk/*
COPY ./bin /app/bin
COPY ./gazouilleur /app/gazouilleur
COPY ./gazouilleur/config-docker.py /app/gazouilleur/config.py
COPY ./docker-entrypoint.sh /app/docker-entrypoint.sh
COPY ./web /app/web.sample
RUN mkdir /app/cache /app/log
RUN chmod +x /app/docker-entrypoint.sh
RUN mkdir -p /root/.config/matplotlib && echo "backend : Agg" > /root/.config/matplotlib/matplotlibrc
VOLUME ["/app/web", "/app/log"]
ENTRYPOINT ["sh", "/app/docker-entrypoint.sh"]