1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2017 Enea AB and others.
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
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.
16 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
18 pre_build_hook | 6 ++++--
19 1 file changed, 4 insertions(+), 2 deletions(-)
21 diff --git a/pre_build_hook b/pre_build_hook
22 index f9a6010..76da923 100755
25 @@ -27,12 +27,14 @@ function build_pkg {
26 DEB_DIR=${DIR}/deb-ovs-dpdk
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/
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/