From 1aa85f5f2dd2bfa766c75649e4de53a9c3a074b9 Mon Sep 17 00:00:00 2001 From: Alexander Kanevskiy Date: Fri, 4 Nov 2016 19:19:02 +0200 Subject: [PATCH] build-image fix for running integration-tests locally Currently if developer tries to run integration tests locally, it would be failing due to missing /var/run/kubernetes inside cross container image. As tests are run by non-privileged user, this directory must be pre-created and made user writable at the time cross build/test container created. --- build-tools/build-image/Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-tools/build-image/Dockerfile b/build-tools/build-image/Dockerfile index aec44f19b5c..57b4300508c 100644 --- a/build-tools/build-image/Dockerfile +++ b/build-tools/build-image/Dockerfile @@ -21,6 +21,10 @@ RUN touch /kube-build-image # To run as non-root we sometimes need to rebuild go stdlib packages. RUN chmod -R a+rwx /usr/local/go/pkg ${K8S_PATCHED_GOROOT}/pkg +# For running integration tests /var/run/kubernetes is required +# and should be writable by user +RUN mkdir /var/run/kubernetes && chmod a+rwx /var/run/kubernetes + # The kubernetes source is expected to be mounted here. This will be the base # of operations. ENV HOME /go/src/k8s.io/kubernetes