From 6ae4e120c5f6aab6834e0ec42599e1b409a9af05 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 29 Aug 2016 23:04:12 +0200 Subject: build: docker: Use host's network stack Armband build benefits (or should have) of a local mirror for "linux.enea.com", which we used to inject into the build system by host's "/etc/hosts". After Armband switched to building inside docker, this change was silently discarded by containerization. The proposed solution uses hosts's network stack in all build containers. See [1] for full description. This change simplifies the network abstraction during build by NOT containerizing the containers' networking. The original motivation was pointing to local mirrors via host's "/etc/hosts", for which an alternative solution could be passing "-v /etc/hosts:/etc/hosts". [1] https://docs.docker.com/v1.8/articles/networking/ Change-Id: I31e3c787a432af49b4799f561669a0150668b222 Signed-off-by: Alexandru Avadanii --- ...055-build-docker-Use-host-s-network-stack.patch | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch (limited to 'patches') diff --git a/patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch b/patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch new file mode 100644 index 00000000..b64c15b6 --- /dev/null +++ b/patches/opnfv-fuel/0055-build-docker-Use-host-s-network-stack.patch @@ -0,0 +1,32 @@ +From: Alexandru Avadanii +Date: Mon, 29 Aug 2016 22:58:49 +0200 +Subject: [PATCH] build: docker: Use host's network stack + +See [1] for full description. +This change simplifies the network abstraction during build by +NOT containerizing the containers' networking. + +The original motivation was pointing to local mirrors via host's +"/etc/hosts", for which an alternative solution could be passing +"-v /etc/hosts:/etc/hosts". + +[1] https://docs.docker.com/v1.8/articles/networking/ + +Signed-off-by: Alexandru Avadanii +--- + build/docker/runcontext | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build/docker/runcontext b/build/docker/runcontext +index 07b0dc1..b0d6d37 100755 +--- a/build/docker/runcontext ++++ b/build/docker/runcontext +@@ -115,7 +115,7 @@ if [ -n "$CACHEBASE" ]; then + fi + fi + +-RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm \ ++RUN_CONTEXT_OPT="--cidfile $CID_FILE --privileged=true --rm --net=host \ + -e HOME=$HOME -e CACHEDEBUG -e CACHETRANSPORT -e CACHEMAXAGE -e CACHEBASE \ + -e BUILD_FUEL_PLUGINS -e MIRROR_UBUNTU -e MIRROR_UBUNTU_ROOT \ + -e MIRROR_MOS_UBUNTU -e MIRROR_MOS_UBUNTU_ROOT -e MIRROR_FUEL \ -- cgit 1.2.3-korg