ffa9ba773b4fb5a704f209495cc184e6efbf334b
[armband.git] / patches / fuel-plugin-ovs / 0003-build-docker-Use-host-s-network-stack.patch
1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2017 Enea AB and others.
3 :
4 : All rights reserved. This program and the accompanying materials
5 : are made available under the terms of the Apache License, Version 2.0
6 : which accompanies this distribution, and is available at
7 : http://www.apache.org/licenses/LICENSE-2.0
8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
9 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 Date: Thu, 15 Sep 2016 19:16:34 +0200
11 Subject: [PATCH] build: docker: Use host's network stack
12
13 Similar to Fuel@OPNFV build process, we want to mount /etc/hosts
14 in the builder container to be able to use local mirror caches.
15
16 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
17 ---
18  pre_build_hook | 6 ++++--
19  1 file changed, 4 insertions(+), 2 deletions(-)
20
21 diff --git a/pre_build_hook b/pre_build_hook
22 index f9a6010..76da923 100755
23 --- a/pre_build_hook
24 +++ b/pre_build_hook
25 @@ -27,12 +27,14 @@ function build_pkg {
26        DEB_DIR=${DIR}/deb-ovs-dpdk
27
28        rm -rf ${DEB_DIR};  mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
29 -      sudo docker run -v ${DEB_DIR}:/deb -t  ovs_build /ovs_build/build-ovs-nsh.sh
30 +      sudo docker run -v ${DEB_DIR}:/deb -v /etc/hosts:/etc/hosts \
31 +        -t ovs_build /ovs_build/build-ovs-nsh.sh
32        cp -r ${DEB_DIR}/*  ${DIR}/repositories/ubuntu/
33
34        rm -rf ${DEB_DIR};  mkdir -p ${DEB_DIR}; chmod 777 ${DEB_DIR};
35        sudo docker run -e "UBUNTU_ARCH=${UBUNTU_ARCH}" -e "BUILD_ARCH=${BUILD_ARCH}" \
36 -        -v ${DEB_DIR}:/deb -t ovs_build /ovs_build/prebuilt-ovs-fetch.sh
37 +        -v ${DEB_DIR}:/deb -v /etc/hosts:/etc/hosts \
38 +        -t ovs_build /ovs_build/prebuilt-ovs-fetch.sh
39        cp -r ${DEB_DIR}/*  ${DIR}/repositories/ubuntu/
40        rm -rf ${DEB_DIR}
41