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 | aad8dbe | 2022-09-19 09:49:58 +0900 | [diff] [blame] | 4 | ## Running Mini-NDN inside Docker |
| 5 | |
| 6 | You can use the nightly build from GitHub package registry |
| 7 | ```bash |
| 8 | docker run -m 4g --cpus=4 -it --privileged \ |
| 9 | -v /lib/modules:/lib/modules \ |
| 10 | ghcr.io/named-data/mini-ndn:master bash |
| 11 | ``` |
| 12 | |
| 13 | ## Building your own image |
dulalsaurab | 8c8e633 | 2021-05-21 20:37:03 +0000 | [diff] [blame] | 14 | |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame] | 15 | The Dockerfile can be used directly to `build` an image from scratch. |
dulalsaurab | 8c8e633 | 2021-05-21 20:37:03 +0000 | [diff] [blame] | 16 | |
| 17 | * Build with `Dockerfile`: |
Varun Patil | 97a347f | 2022-05-18 14:09:20 -0700 | [diff] [blame] | 18 | * Clone the repository and type. |
dulalsaurab | 8c8e633 | 2021-05-21 20:37:03 +0000 | [diff] [blame] | 19 | ```bash |
| 20 | docker build -t minindn . |
| 21 | ``` |
| 22 | * You can then access the container through shell with, |
| 23 | ```bash |
Varun Patil | aad8dbe | 2022-09-19 09:49:58 +0900 | [diff] [blame] | 24 | docker run -m 4g --cpus=4 -it --privileged \ |
dulalsaurab | 8c8e633 | 2021-05-21 20:37:03 +0000 | [diff] [blame] | 25 | -v /lib/modules:/lib/modules \ |
| 26 | minindn bin/bash |
| 27 | ``` |
| 28 | |
dulalsaurab | 8c8e633 | 2021-05-21 20:37:03 +0000 | [diff] [blame] | 29 | ### Notes: |
| 30 | |
| 31 | * Memory (-m), CPU (--cpus) are recommended by Mini-NDN. |
| 32 | * `--privileged` is mandatory for underlying [Mininet](http://mininet.org/) to utilize virtual switch |
| 33 | * Root directory on `run` is `/mini-ndn` containing the installation and examples. |
Varun Patil | aad8dbe | 2022-09-19 09:49:58 +0900 | [diff] [blame] | 34 | * GUI may not work for now due to docker and xterm setup issues and is independent from Mini-NDN. |
| 35 | If you intend to run the GUI, pass `-e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix` to the `docker run` command. |