From 3b93d4dac1b3f0b9150fc593fdea157cdbad9970 Mon Sep 17 00:00:00 2001 From: derekwaynecarr Date: Fri, 20 May 2016 11:39:40 -0400 Subject: [PATCH] Fix builds on selinux systems --- build/common.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build/common.sh b/build/common.sh index 089816bc0f1..651bd4c5500 100755 --- a/build/common.sh +++ b/build/common.sh @@ -308,8 +308,10 @@ function kube::build::clean_output() { # Make sure the _output directory is created and mountable by docker function kube::build::prepare_output() { + # See auto-creation of host mounts: https://github.com/docker/docker/pull/21666 + # if selinux is enabled, docker run -v /foo:/foo:Z will not autocreate the host dir mkdir -p "${LOCAL_OUTPUT_SUBPATH}" - + mkdir -p "${LOCAL_OUTPUT_BINPATH}" # On RHEL/Fedora SELinux is enabled by default and currently breaks docker # volume mounts. We can work around this by explicitly adding a security # context to the _output directory. @@ -327,7 +329,10 @@ function kube::build::prepare_output() { number=${#DOCKER_MOUNT_ARGS[@]} for (( i=0; i