blob: b799dbc5adb40562f31151510d13255592837b75 [file] [log] [blame]
Charles Chan38240872019-10-23 02:05:05 -07001FROM ubuntu:18.04
2MAINTAINER Charles Chan <rascov@gmail.com>
3
4ENV HOME /root
5
6# Install dependencies
7WORKDIR $HOME
8RUN apt-get update && \
9 DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install git gawk texinfo python-pip build-essential iptables automake autoconf libtool openvswitch-switch mininet \
10 isc-dhcp-server isc-dhcp-client iputils-ping net-tools curl iproute2 ethtool && \
11 pip install ipaddress && \
12 rm -rf /var/lib/apt/lists/*
13
14# Install Quagga
15RUN git clone -b onos-1.11 https://gerrit.opencord.org/quagga
16WORKDIR $HOME/quagga
17RUN ./bootstrap.sh
18RUN ./configure --enable-fpm --sbindir=/usr/lib/quagga enable_user=root enable_group=root
19RUN make
20RUN make install
21
22# Clone Trellis simulation repo
23WORKDIR $HOME
24RUN git clone https://gerrit.onosproject.org/routing
25
26# Update dynamic linker
27RUN ldconfig
28
29# Fetch ONOS netcfg tools
30WORKDIR $HOME
31RUN curl -o /usr/local/bin/onos-netcfg https://raw.githubusercontent.com/opennetworkinglab/onos/onos-1.12/tools/package/runtime/bin/onos-netcfg
32RUN curl -o /usr/local/bin/_rest-port https://raw.githubusercontent.com/opennetworkinglab/onos/onos-1.12/tools/package/runtime/bin/_rest-port
33RUN curl -o /usr/local/bin/_find-node https://raw.githubusercontent.com/opennetworkinglab/onos/onos-1.12/tools/package/runtime/bin/_find-node
34RUN curl -o /usr/local/bin/_check-json https://raw.githubusercontent.com/opennetworkinglab/onos/onos-1.12/tools/package/runtime/bin/_check-json
35RUN chmod a+x /usr/local/bin/onos-netcfg /usr/local/bin/_rest-port /usr/local/bin/_find-node /usr/local/bin/_check-json
36
37# Copy useful Mininet utility
38COPY m $HOME
39
40# Copy start script
41COPY entrypoint.sh $HOME
42
43# Requirement for Mininet NAT class
44RUN touch /etc/network/interfaces