Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame] | 1 | # Setup container with Ubuntu 20.04 image |
| 2 | FROM ubuntu:20.04 |
| 3 | |
| 4 | # Set the working directory to / |
| 5 | WORKDIR / |
| 6 | |
| 7 | # expose ports for openvswitch-switch |
| 8 | EXPOSE 6633 6653 6640 |
| 9 | |
| 10 | # Update container image |
| 11 | RUN apt-get update -y && \ |
| 12 | apt-get autoremove -y && \ |
| 13 | apt-get install --no-install-recommends -y \ |
| 14 | lsb-release sudo \ |
| 15 | zip unzip wget git ca-certificates \ |
| 16 | curl iproute2 iputils-ping net-tools \ |
| 17 | tcpdump vim x11-xserver-utils xterm && \ |
| 18 | update-ca-certificates && \ |
| 19 | alias python=python3 |
| 20 | |
| 21 | RUN git clone --depth 1 https://github.com/mininet/mininet.git && \ |
| 22 | cd mininet && ./util/install.sh && cd / |
| 23 | |
| 24 | COPY . /mini-ndn |
| 25 | |
| 26 | RUN cd mini-ndn && \ |
| 27 | pip3 install -r requirements.txt && \ |
| 28 | ./install.sh -y --ppa && cd / |
| 29 | |
| 30 | RUN rm -rf /var/lib/apt/lists/* |
| 31 | |
| 32 | COPY docker/ENTRYPOINT.sh / |
| 33 | RUN chmod +x ENTRYPOINT.sh |
| 34 | |
| 35 | # Change the working directory to /mini-ndn |
| 36 | WORKDIR /mini-ndn |
| 37 | |
| 38 | ENTRYPOINT ["/ENTRYPOINT.sh"] |