aboutsummaryrefslogtreecommitdiffstats
path: root/patches/fuel-plugin-ovs/0008-build-docker-Use-host-s-network-stack.patch
blob: e060681922269f16bd815b9e38416b9aeae70eda (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
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 3e46a37..4866219 100755
--- a/pre_build_hook
+++ b/pre_build_hook
@@ -28,9 +28,11 @@ function build_pkg {
       cd ${DIR}/ovs_build
       if [ "${USE_DOCKER}" = true ]; then
         sudo docker build -t ovs_build .
-        sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -v ${DEB_DIR}:/deb \
+        sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" \
+          -v ${DEB_DIR}:/deb -v /etc/hosts:/etc/hosts \
           -t ovs_build /ovs_build/build-ovs-dpdk.sh
-        sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -v ${DEB_DIR_NSH}:/deb \
+        sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" \
+          -v ${DEB_DIR_NSH}:/deb -v /etc/hosts:/etc/hosts \
           -t ovs_build /ovs_build/build-ovs-nsh-dpdk.sh
       else
         rm -rf /tmp/ovs-build-{,nsh-}dpdk; mkdir -p /tmp/ovs-build-{,nsh-}dpdk