forked from ocf/ocfweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (43 loc) · 1.45 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
# A base ocfweb Dockerfile containing the code and dependencies.
# This doesn't run the website or the background worker; see Dockerfile.* for those.
FROM docker.ocf.berkeley.edu/theocf/debian:stretch
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential \
cracklib-runtime \
libcrack2 \
libcrack2-dev \
libffi-dev \
libfreetype6-dev \
libpng-dev \
libssl-dev \
libxft-dev \
libxml2-dev \
locales \
nginx \
python3 \
python3-dev \
python3-pip \
redis-tools \
runit \
virtualenv \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN install -d --owner=nobody /opt/ocfweb /opt/ocfweb/venv /etc/ocfweb
COPY requirements.txt /opt/ocfweb/
RUN virtualenv -ppython3 /opt/ocfweb/venv \
&& /opt/ocfweb/venv/bin/pip install pip==8.1.2 \
&& /opt/ocfweb/venv/bin/pip install \
-r /opt/ocfweb/requirements.txt
ARG ocflib_version=
RUN /opt/ocfweb/venv/bin/pip install ocflib${ocflib_version}
COPY bootstrap-scss /opt/ocfweb/bootstrap-scss/
COPY manage.py /opt/ocfweb/
COPY ocfweb /opt/ocfweb/ocfweb/
COPY conf /etc/ocfweb/
ENV MATPLOTLIBRC /etc/ocfweb
# Marathon will set this to 0, but we set it to 1 in case staff run this
# locally to prevent ocflib report emails.
ENV OCFWEB_TESTING 1
WORKDIR /opt/ocfweb
CMD ["runsvdir", "/opt/ocfweb/services"]