forked from uktrade/invest-pir-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (24 loc) · 1.25 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
FROM python:3.5
# Current version of debian in the python image is waaayyy tooo ollllddddd.
# Need libcairo2 > 1.4
# gettext to compile translations
# redis for caching and sessions
RUN sed '1 s/jessie/buster/' /etc/apt/sources.list > /etc/apt/sources.list.temp
RUN mv /etc/apt/sources.list.temp /etc/apt/sources.list
RUN apt-get update
RUN apt-get install -y gettext redis-server libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev && apt-get clean curl && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY ./fonts/* /usr/share/fonts/
RUN fc-cache -f -v
ADD requirements.txt /usr/src/app/
# Because directory-signature-auth uses pip internals
RUN pip install pip==9
# Different src directory for pip to prevent 'pip install -e' packages to be installed in /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt --src /usr/local/src
ADD . /usr/src/app
# Install dockerize https://github.com/jwilder/dockerize
ENV DOCKERIZE_VERSION v0.5.0
RUN wget -q https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
CMD ["/usr/src/app/docker/cmd-webserver.sh"]