-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.template
59 lines (37 loc) · 1.09 KB
/
Dockerfile.template
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
# Base image
FROM figure/%%RESIN_MACHINE_NAME%%:1.1.0
MAINTAINER Benoit Guigal <[email protected]>
RUN git clone https://github.com/Postcard/png2pos.git && \
cd png2pos && \
git checkout tags/1.0 && \
git submodule init && \
git submodule update && \
make install
# Install dependencies for python-webkit2png
RUN apt-get update && apt-get install python-qt4 \
libqt4-webkit \
xvfb \
xauth
# Add xvfb to init.d
ADD xvfb /etc/init.d/xvfb
RUN chmod +x /etc/init.d/xvfb
ENV DISPLAY :1
# Install Python dependencies
RUN mkdir requirements
ADD requirements ./requirements
RUN cd requirements && pip install -r prod.txt
ENV FIGURE_DIR /figure/figureraspbian
ENV IMAGE_DIR /data/images
ENV DATA_ROOT /data
ENV STATIC_ROOT /data/static
ENV MEDIA_ROOT /data/media
RUN mkdir -p /usr/share/fonts/opentype
COPY fonts/*.otf /usr/share/fonts/opentype/
RUN fc-cache -f -v
WORKDIR /
COPY figureraspbian /figureraspbian
COPY resources /resources
COPY ./start.sh /
COPY ./supervisord.conf /etc/
RUN mkdir -p /var/log /var/run && chmod 755 /start.sh
CMD ["/bin/bash", "/start.sh"]