From 92da8e6f1c860f5bc0a2a6b7c74a64806f004b37 Mon Sep 17 00:00:00 2001 From: Tim Hockin Date: Mon, 9 May 2016 23:26:42 -0700 Subject: [PATCH] Make it possible to use kube-cross as non-root The extra TMPDIR was not writable except as root. This is not the only fix needed for this goal, but is necessary. --- build/build-image/cross/Dockerfile | 4 +++- build/build-image/cross/VERSION | 2 +- build/common.sh | 2 +- cluster/images/flannel/Makefile | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build/build-image/cross/Dockerfile b/build/build-image/cross/Dockerfile index 2c7aec432ec..3746337302d 100644 --- a/build/build-image/cross/Dockerfile +++ b/build/build-image/cross/Dockerfile @@ -35,7 +35,7 @@ RUN for platform in ${KUBE_CROSSPLATFORMS}; do GOOS=${platform%/*} GOARCH=${plat # Install g++, then download and install protoc for generating protobuf output RUN apt-get update \ - && apt-get install -y g++ rsync \ + && apt-get install -y g++ rsync apt-utils file \ && apt-get clean && rm -rf /var/lib/apt/lists/* RUN mkdir -p /usr/local/src/protobuf \ @@ -64,6 +64,8 @@ ENV TMPDIR /tmp.k8s # Get the code coverage tool and godep RUN mkdir $TMPDIR \ + && chmod a+rwx $TMPDIR \ + && chmod o+t $TMPDIR \ && go get golang.org/x/tools/cmd/cover github.com/tools/godep # Download and symlink etcd. We need this for our integration tests. diff --git a/build/build-image/cross/VERSION b/build/build-image/cross/VERSION index ae6fa32e6a4..4d9054700c4 100644 --- a/build/build-image/cross/VERSION +++ b/build/build-image/cross/VERSION @@ -1 +1 @@ -v1.6.2-1 +v1.6.2-2 diff --git a/build/common.sh b/build/common.sh index 3c5c7d51903..089816bc0f1 100755 --- a/build/common.sh +++ b/build/common.sh @@ -45,7 +45,7 @@ readonly KUBE_GCS_DELETE_EXISTING="${KUBE_GCS_DELETE_EXISTING:-n}" # Constants readonly KUBE_BUILD_IMAGE_REPO=kube-build -readonly KUBE_BUILD_IMAGE_CROSS_TAG="v1.6.2-1" +readonly KUBE_BUILD_IMAGE_CROSS_TAG="v1.6.2-2" # KUBE_BUILD_DATA_CONTAINER_NAME=kube-build-data-" # Here we map the output directories across both the local and remote _output diff --git a/cluster/images/flannel/Makefile b/cluster/images/flannel/Makefile index 7e6ea08dd4e..bcf93acaf12 100644 --- a/cluster/images/flannel/Makefile +++ b/cluster/images/flannel/Makefile @@ -20,7 +20,7 @@ TAG?=0.5.5 ARCH?=amd64 REGISTRY?=gcr.io/google_containers -KUBE_CROSS_TAG=v1.6.2-1 +KUBE_CROSS_TAG=$(shell cat ../../../build-image/cross/VERSION) GOARM=6 TEMP_DIR:=$(shell mktemp -d) BASEIMAGE?=gcr.io/google_containers/debian-iptables-${ARCH}:v2