summaryrefslogtreecommitdiffstats
path: root/patches/fuel-plugin-ovs/0003-build-docker-Use-host-s-network-stack.patch
blob: ffa9ba773b4fb5a704f209495cc184e6efbf334b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
: Copyright (c) 2017 Enea AB and others.
:
: All rights reserved. This program and the accompanying materials
: are made available under the terms of the Apache License, Version 2.0
: which accompanies this distribution, and is available at
: http://www.apache.org/licenses/LICENSE-2.0
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Date: Thu, 15 Sep 2016 19:16:34 +0200
Subject: [PATCH] build: docker: Use host's network stack

Similar to Fuel@OPNFV build process, we want to mount /etc/hosts
in the builder container to be able to use local mirror caches.

Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
 pre_build_hook | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/pre_build_hook b/pre_build_hook
index f9a6010..76da923 100755
--- a/pre_build_hook
+++ b/pre_build_hook
@@ -27,12 +27,14 @@ function build_pkg {
       DEB_DIR=${DIR}/deb-ovs-dpdk

       rm -rf ${DEB_DIR};  mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
-      sudo docker run -v ${DEB_DIR}:/deb -t  ovs_build /ovs_build/build-ovs-nsh.sh
+      sudo docker run -v ${DEB_DIR}:/deb -v /etc/hosts:/etc/hosts \
+        -t ovs_build /ovs_build/build-ovs-nsh.sh
       cp -r ${DEB_DIR}/*  ${DIR}/repositories/ubuntu/

       rm -rf ${DEB_DIR};  mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
       sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -e "BUILD_ARCH=${BUILD_ARCH}" \
-        -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/prebuilt-ovs-fetch.sh
+        -v ${DEB_DIR}:/deb -v /etc/hosts:/etc/hosts \
+        -t ovs_build /ovs_build/prebuilt-ovs-fetch.sh
       cp -r ${DEB_DIR}/*  ${DIR}/repositories/ubuntu/
       rm -rf ${DEB_DIR}