Varun Patil | 047b92c | 2022-10-14 12:02:51 -0700 | [diff] [blame] | 1 | # Setup container with Ubuntu 22.04 image |
| 2 | FROM ubuntu:22.04 |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame] | 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 && \ |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame] | 12 | apt-get install --no-install-recommends -y \ |
| 13 | lsb-release sudo \ |
| 14 | zip unzip wget git ca-certificates \ |
| 15 | curl iproute2 iputils-ping net-tools \ |
Varun Patil | 047b92c | 2022-10-14 12:02:51 -0700 | [diff] [blame] | 16 | python3 python3-pip \ |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame] | 17 | tcpdump vim x11-xserver-utils xterm && \ |
| 18 | update-ca-certificates && \ |
Varun Patil | 047b92c | 2022-10-14 12:02:51 -0700 | [diff] [blame] | 19 | rm -rf /var/lib/apt/lists/* && \ |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame] | 20 | alias python=python3 |
| 21 | |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame] | 22 | COPY . /mini-ndn |
| 23 | |
| 24 | RUN cd mini-ndn && \ |
| 25 | pip3 install -r requirements.txt && \ |
Varun Patil | 047b92c | 2022-10-14 12:02:51 -0700 | [diff] [blame] | 26 | ./install.sh -y --source && \ |
| 27 | cd dl/mininet && make install && cd ../.. && \ |
| 28 | cd dl/mininet-wifi && make install && cd ../.. && \ |
| 29 | rm -rf dl && rm -rf /var/lib/apt/lists/* && cd / |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame] | 30 | |
| 31 | COPY docker/ENTRYPOINT.sh / |
| 32 | RUN chmod +x ENTRYPOINT.sh |
| 33 | |
| 34 | # Change the working directory to /mini-ndn |
| 35 | WORKDIR /mini-ndn |
| 36 | |
| 37 | ENTRYPOINT ["/ENTRYPOINT.sh"] |