blob: be8d72d927bd65d28c72afd8821c157ef0416ada [file] [log] [blame]
Jon Halldac3eae2020-06-05 12:04:06 -07001FROM opennetworking/mn-stratum
2
Jon Hall43060f62020-06-23 13:13:33 -07003ENV HOME /home/root
4WORKDIR $HOME
5RUN ln -s /root/* .
6RUN chmod 777 $HOME
7
Jon Hall3c0114c2020-08-11 15:07:42 -07008RUN install_packages python-pip openvswitch-switch vim quagga isc-dhcp-server isc-dhcp-client iptables vlan vzctl
Jon Halldac3eae2020-06-05 12:04:06 -07009RUN pip install ipaddress
Jon Hall43060f62020-06-23 13:13:33 -070010
11RUN ln -s $HOME /var/run/quagga
12RUN ln -s /usr/sbin/zebra /usr/lib/quagga/zebra
13RUN ln -s /usr/sbin/bgpd /usr/lib/quagga/bgpd
14
15# try to ensure dhclient can write pid files
16RUN chmod 777 /run
17RUN ls -al $HOME
18# Issue with Uubuntu/Apparmour
19RUN mv /sbin/dhclient /usr/local/bin/ \
20&& touch /var/lib/dhcp/dhcpd.leases
21
22# Install custom mininet branch
23run install_packages git sudo lsb-release
24RUN git clone https://github.com/jhall11/mininet.git \
25&& cd mininet \
26&& git branch -v -a \
27&& git checkout -b dynamic_topo origin/dynamic_topo \
28&& cd util \
29&& alias sudo='' \
30&& apt-get update \
31&& ./install.sh -3fvn
Jon Hall9b0de1f2020-08-24 15:38:04 -070032
33# Install scapy dependencies
34RUN apt-get update && \
35 apt-get -y install \
36 gcc tcpdump libpcap-dev \
37 python3 python3-pip tcpdump
38#install pip packages for scapy
39RUN pip3 install pexpect \
40 netaddr \
41 pyYaml \
42 ipaddr
43RUN git clone https://github.com/secdev/scapy.git \
44 && cd scapy \
45 && python setup.py install \
46 && pip install --pre scapy[basic]
47# Fix for tcpdump/docker bug
48RUN mv /usr/sbin/tcpdump /usr/bin/tcpdump \
49 && ln -s /usr/bin/tcpdump /usr/sbin/tcpdump
Jon Halldac3eae2020-06-05 12:04:06 -070050ENTRYPOINT bash