-
Notifications
You must be signed in to change notification settings - Fork 111
/
Dockerfile.prod.celery
40 lines (29 loc) · 1.25 KB
/
Dockerfile.prod.celery
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
FROM python:2.7
RUN mkdir -p /app/
WORKDIR /app
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf
COPY ./kuiper/requirements_3.txt ./requirements_3.txt
COPY ./kuiper/requirements_2.7.txt ./requirements_2.7.txt
RUN apt update -y
RUN apt install -y python-minimal python3 python-dev libsasl2-dev libldap2-dev libssl-dev python-pip build-essential libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev python3-pip sqlite3 cron p7zip-full
RUN pip2 install --upgrade pip
RUN pip2 install -r "./requirements_2.7.txt"
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install -r "./requirements_3.txt"
# install ndpi
WORKDIR /tmp/
RUN apt-get install -y build-essential git gettext flex bison libtool autoconf automake pkg-config libpcap-dev libjson-c-dev libnuma-dev libpcre2-dev libmaxminddb-dev librrd-dev
RUN git clone https://github.com/ntop/nDPI.git
WORKDIR /tmp/nDPI
RUN chmod +x ./autogen.sh
RUN ./autogen.sh
RUN ./configure
RUN make
RUN make install
WORKDIR /app
COPY ./system_health/ /system_health/
COPY ./system_health/crontabs/crontab.celery /etc/cron.d/crontab
RUN chmod 0644 /etc/cron.d/crontab
RUN crontab /etc/cron.d/crontab
RUN touch /var/log/cron_celery.log
CMD cron && python -m celery worker -A app.celery_app --loglevel=info -n "kuiper@%h"