dulalsaurab | 8c8e633 | 2021-05-21 20:37:03 +0000 | [diff] [blame] | 1 | |
| 2 | [comments]: The original author of Mini-NDN docker is Md Ashiqur Rahman (marahman@email.arizona.edu) |
| 3 | |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame^] | 4 | ### `docker build` |
dulalsaurab | 8c8e633 | 2021-05-21 20:37:03 +0000 | [diff] [blame] | 5 | |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame^] | 6 | The Dockerfile can be used directly to `build` an image from scratch. |
dulalsaurab | 8c8e633 | 2021-05-21 20:37:03 +0000 | [diff] [blame] | 7 | |
| 8 | * Build with `Dockerfile`: |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame^] | 9 | * Clone the repository and type. |
dulalsaurab | 8c8e633 | 2021-05-21 20:37:03 +0000 | [diff] [blame] | 10 | ```bash |
| 11 | docker build -t minindn . |
| 12 | ``` |
| 13 | * You can then access the container through shell with, |
| 14 | ```bash |
| 15 | docker run -m 4g --cpus=4 -it --rm --privileged \ |
| 16 | -v /lib/modules:/lib/modules \ |
| 17 | minindn bin/bash |
| 18 | ``` |
| 19 | |
| 20 | * Pull from hub: |
| 21 | * Open a terminal and type: |
| 22 | ```bash |
| 23 | docker pull marahman/minindn:v0.2 |
| 24 | ``` |
| 25 | |
| 26 | * You can then access the container through shell with, |
| 27 | ```bash |
| 28 | docker run -m 4g --cpus=4 -it --rm --privileged -e DISPLAY \ |
| 29 | -v /tmp/.X11-unix:/tmp/.X11-unix \ |
| 30 | -v /lib/modules:/lib/modules \ |
| 31 | marahman/minindn:v0.2 bin/bash |
| 32 | ``` |
| 33 | |
| 34 | ### Notes: |
| 35 | |
| 36 | * Memory (-m), CPU (--cpus) are recommended by Mini-NDN. |
| 37 | * `--privileged` is mandatory for underlying [Mininet](http://mininet.org/) to utilize virtual switch |
| 38 | * Root directory on `run` is `/mini-ndn` containing the installation and examples. |
| 39 | * GUI may not work for now due to docker and xterm setup issues and is independent from Mini-NDN. |