Browse Source

Fix docker volume issue in ovs build

Change-Id: I9c87cb6e204b80df72020cac0297c27f603fb109
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Guo Ruijing 2 years ago
parent
commit
fd77b5d487
1 changed files with 11 additions and 8 deletions
  1. 11
    8
      pre_build_hook

+ 11
- 8
pre_build_hook View File

@@ -13,15 +13,18 @@ function build_pkg {
13 13
       cd ${DIR}/ovs_build
14 14
       sudo docker build -t ovs_build .
15 15
 
16
-      rm -rf ${DIR}/deb;  mkdir -p ${DIR}/deb; chmod 777 ${DIR}/deb; cd ${DIR}/deb
17
-      sudo docker run -v ${DIR}/deb:/deb -t  ovs_build /ovs_build/build-ovs-dpdk.sh
18
-      tar czvf ../repositories/ubuntu/ovs-dpdk.tar.gz .; cd ..
16
+      DEB_DIR=${DIR}/deb-ovs-dpdk
17
+      rm -rf ${DEB_DIR};  mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
18
+      sudo docker run -v ${DEB_DIR}:/deb -t  ovs_build /ovs_build/build-ovs-dpdk.sh
19
+      cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-dpdk.tar.gz .;
20
+      cd ..; rm -rf ${DEB_DIR}
21
+
22
+      DEB_DIR=${DIR}/deb-ovs-nsh-dpdk
23
+      rm -rf ${DEB_DIR};  mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
24
+      sudo docker run -v ${DEB_DIR}:/deb -t  ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
25
+      cd ${DEB_DIR}; tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .;
26
+      cd ..; rm -rf ${DEB_DIR}
19 27
 
20
-      rm -rf ${DIR}/deb;  mkdir -p ${DIR}/deb; chmod 777 ${DIR}/deb; cd ${DIR}/deb
21
-      sudo docker run -v ${DIR}/ovs-nsh:/deb -t  ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
22
-      tar czvf ../repositories/ubuntu/ovs-nsh-dpdk.tar.gz .; cd ..
23
-
24
-      rm -rf ${DIR}/deb;
25 28
       ;;
26 29
     *) echo "Not supported system"; exit 1;;
27 30
   esac

Loading…
Cancel
Save