diff --git a/build/common.sh b/build/common.sh index 016df783d54..285cd2f46c0 100755 --- a/build/common.sh +++ b/build/common.sh @@ -312,8 +312,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. @@ -331,7 +333,10 @@ function kube::build::prepare_output() { number=${#DOCKER_MOUNT_ARGS[@]} for (( i=0; i