-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
54 lines (44 loc) · 1.55 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
52
53
54
FROM ubuntu:18.04
LABEL maintainer="Rolando Brondolin"
RUN apt-get clean && apt-get update \
&& apt-get install -y python3 python3-pip locales locales-all libelf1 \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install --upgrade pip && pip3 install numpy pyyaml docker
#Needed by Curse to print unicode characters to the terminal
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
#install bcc and ddsketch
RUN buildDeps='python python-pip wget curl apt-transport-https git bison build-essential cmake flex libedit-dev libllvm6.0 llvm-6.0-dev libclang-6.0-dev zlib1g-dev libelf-dev' \
&& apt-get update && apt-get install -y $buildDeps \
&& git clone https://github.com/iovisor/bcc.git \
&& mkdir bcc/build \
&& cd bcc/build \
&& cmake .. \
&& make \
&& make install \
&& cmake -DPYTHON_CMD=python3 .. \
&& cd src/python/ \
&& make \
&& make install \
&& cd / \
&& rm -r bcc \
&& git clone --branch v1.0 https://github.com/DataDog/sketches-py.git \
&& cd sketches-py \
&& python3 setup.py install \
&& cd / \
&& rm -r sketches-py \
&& apt-get purge -y --auto-remove $buildDeps \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /home
RUN mkdir /home/deep_mon
ADD bpf /home/deep_mon/bpf
ADD userspace /home/deep_mon/userspace
ADD deep_mon.py /home/deep_mon/
ADD setup.py /home
#Install plugin dependencies
RUN pip3 install . && rm -rf /home/deep_mon && rm setup.py
# "-u" forces the binary I/O layers of stdout and stderr to be unbuffered and
# is needed to avoid truncated output in Docker
ENV PYTHONUNBUFFERED="on"
CMD ["deep-mon"]