blob: 0004ffb4a6c566b20fd02bb3a54e238f92244939 [file] [log] [blame] [view]
dulalsaurab8c8e6332021-05-21 20:37:03 +00001
2[comments]: The original author of Mini-NDN docker is Md Ashiqur Rahman (marahman@email.arizona.edu)
3
Varun Patilaad8dbe2022-09-19 09:49:58 +09004## Running Mini-NDN inside Docker
5
6You can use the nightly build from GitHub package registry
7```bash
8docker 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
dulalsaurab8c8e6332021-05-21 20:37:03 +000014
Varun Patil97a347f2022-05-18 14:09:20 -070015The Dockerfile can be used directly to `build` an image from scratch.
dulalsaurab8c8e6332021-05-21 20:37:03 +000016
17* Build with `Dockerfile`:
Varun Patil97a347f2022-05-18 14:09:20 -070018 * Clone the repository and type.
dulalsaurab8c8e6332021-05-21 20:37:03 +000019 ```bash
20 docker build -t minindn .
21 ```
22 * You can then access the container through shell with,
23 ```bash
Varun Patilaad8dbe2022-09-19 09:49:58 +090024 docker run -m 4g --cpus=4 -it --privileged \
dulalsaurab8c8e6332021-05-21 20:37:03 +000025 -v /lib/modules:/lib/modules \
26 minindn bin/bash
27 ```
28
dulalsaurab8c8e6332021-05-21 20:37:03 +000029### 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 Patilaad8dbe2022-09-19 09:49:58 +090034* GUI may not work for now due to docker and xterm setup issues and is independent from Mini-NDN.
35If you intend to run the GUI, pass `-e DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix` to the `docker run` command.