aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoryalei wang <wylandrea@gmail.com>2018-10-16 07:38:32 +0000
committerGerrit Code Review <gerrit@fd.io>2018-10-16 07:38:32 +0000
commit13d112447a0b6026a2ee6aae88e5b14908f09f37 (patch)
tree08a5d863b31291cd88a0a03e32cc23a34f56643a
parentaf0587ee6e44e9057ff6047a00fcd9015df1f5a1 (diff)
parent4e55a678ccc492a3f6375a0b5331e42d35332d13 (diff)
Merge "Feat: build docker image for centos"
-rw-r--r--docker/dmm_image/README.md13
-rw-r--r--docker/dmm_image/centos/Dockerfile17
2 files changed, 30 insertions, 0 deletions
diff --git a/docker/dmm_image/README.md b/docker/dmm_image/README.md
new file mode 100644
index 0000000..0b674b2
--- /dev/null
+++ b/docker/dmm_image/README.md
@@ -0,0 +1,13 @@
+# How to build the image of dmm
+Note: Make sure your computer can connect to the network
+```sh
+ #cd dmm/docker/dmm_image/centos
+ #docker build -t "dmm:tag" .
+```
+
+# How to use the image of dmm
+```sh
+ #docker run -i -t --network=host -v /sys/bus/pci/devices:/sys/bus/pci/devices -v /sys/devices/system/node:/sys/devices/system/node -v /mnt/nstackhuge:/mnt/nstackhuge -v /dev:/dev --privileged dmm:tag /bin/bash
+```
+
+Then we will enter a container and we can build dmm and run the app.
diff --git a/docker/dmm_image/centos/Dockerfile b/docker/dmm_image/centos/Dockerfile
new file mode 100644
index 0000000..de772fe
--- /dev/null
+++ b/docker/dmm_image/centos/Dockerfile
@@ -0,0 +1,17 @@
+FROM docker.io/centos:latest
+
+RUN yum install -y git vim sudo ethtool
+
+RUN yum install -y kernel-devel-`uname -r`
+RUN yum install -y kernel-`uname -r`
+
+RUN git config --global http.sslVerify false
+RUN git config --global user.email "you@example.com"
+RUN git config --global user.name "Your Name"
+
+RUN git clone https://gerrit.fd.io/r/dmm
+
+RUN mkdir -p /var/run/ip_module/
+RUN mkdir -p /var/log/nStack/ip_module/
+
+RUN cd /dmm/scripts/ && bash -x build.sh && cd /dmm/ && git clean -dfx ./ && git checkout ./