22
22
ENV DEBIAN_FRONTEND=noninteractive
23
23
24
24
## Set the apt source, update package cache and install necessary packages
25
+ ## TODO: Clean up this step
25
26
RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' /etc/apt/sources.list \
26
27
&& apt-get update \
27
28
&& apt-get upgrade -y \
@@ -38,7 +39,6 @@ RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' /
38
39
unzip \
39
40
pkg-config \
40
41
binutils \
41
- net-tools \
42
42
build-essential \
43
43
libssl-dev \
44
44
libffi-dev \
@@ -52,7 +52,6 @@ RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' /
52
52
iputils-ping \
53
53
hping3 \
54
54
curl \
55
- tcpdump \
56
55
tmux \
57
56
python \
58
57
python-dev \
@@ -63,14 +62,17 @@ RUN sed --in-place 's/httpredir.debian.org/debian-archive.trafficmanager.net/' /
63
62
rsyslog \
64
63
ntp \
65
64
ntpstat \
66
- ntpdate
65
+ ntpdate \
66
+ arping \
67
+ bridge-utils
67
68
68
69
RUN dpkg -i \
69
70
{% for deb in docker_ptf_debs .split (' ' ) -%}
70
71
debs/{{ deb }}{{' '}}
71
72
{% - endfor %}
72
73
73
74
# Install all python modules from pypi. python-scapy is exception, ptf debian package requires python-scapy
75
+ # TODO: Clean up this step
74
76
RUN rm -rf /debs \
75
77
&& apt-get -y autoclean \
76
78
&& apt-get -y autoremove \
@@ -106,6 +108,7 @@ RUN rm -rf /debs \
106
108
&& pip install flask \
107
109
&& pip install exabgp==3.4.17\
108
110
&& pip install pyaml \
111
+ && pip install pybrctl pyro4 rpyc yabgp \
109
112
&& mkdir -p /opt \
110
113
&& cd /opt \
111
114
&& wget https://raw.githubusercontent.com/p4lang/ptf/master/ptf_nn/ptf_nn_agent.py
@@ -117,15 +120,16 @@ RUN mkdir /var/run/sshd \
117
120
&& sed -ri '/^#?UsePAM/c\UsePAM no' /etc/ssh/sshd_config \
118
121
&& sed -ri '/^#?UseDNS/c\UseDNS no' /etc/ssh/sshd_config
119
122
120
- COPY ["supervisord.conf", "/etc/supervisor/"]
121
- COPY ["conf.d/supervisord.conf", "conf.d/sshd.conf", "conf.d/ptf_nn_agent.conf", "/etc/supervisor/conf.d/"]
123
+ COPY supervisord.conf /etc/supervisor/
124
+ COPY conf.d/ /etc/supervisor/conf.d/
125
+ COPY ptf_tgen.sh /ptf_tgen/
122
126
123
127
# Move tcpdump into /usr/bin Otherwise it's impossible to run tcpdump due to a docker bug
124
128
RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump
125
129
RUN ln -s /usr/bin/tcpdump /usr/sbin/tcpdump
126
130
127
131
RUN mkdir -p /var/log/supervisor
128
132
129
- EXPOSE 22
133
+ EXPOSE 22 8009
130
134
131
135
ENTRYPOINT ["/usr/local/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
0 commit comments