File tree 5 files changed +415
-6
lines changed
5 files changed +415
-6
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ FROM gcr.io/google_containers/kube-cross:KUBE_BUILD_IMAGE_CROSS_TAG
18
18
# Mark this as a kube-build container
19
19
RUN touch /kube-build-image
20
20
21
- # TO run as non-root we sometimes need to rebuild go stdlib packages.
22
- RUN chmod -R a+rwx /usr/local/go/pkg
21
+ # To run as non-root we sometimes need to rebuild go stdlib packages.
22
+ RUN chmod -R a+rwx /usr/local/go/pkg ${K8S_PATCHED_GOROOT}/pkg
23
23
24
24
# The kubernetes source is expected to be mounted here. This will be the base
25
25
# of operations.
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ RUN for platform in ${KUBE_CROSSPLATFORMS}; do GOOS=${platform%/*} GOARCH=${plat
35
35
36
36
# Install g++, then download and install protoc for generating protobuf output
37
37
RUN apt-get update \
38
- && apt-get install -y g++ rsync apt-utils file \
38
+ && apt-get install -y g++ rsync apt-utils file patch \
39
39
&& apt-get clean && rm -rf /var/lib/apt/lists/*
40
40
41
41
RUN mkdir -p /usr/local/src/protobuf \
@@ -77,3 +77,16 @@ RUN export ETCD_VERSION=v2.2.1; \
77
77
&& cd /usr/local/src/etcd \
78
78
&& curl -fsSL https://github.com/coreos/etcd/releases/download/${ETCD_VERSION}/etcd-${ETCD_VERSION}-linux-amd64.tar.gz | tar -xz \
79
79
&& ln -s ../src/etcd/etcd-${ETCD_VERSION}-linux-amd64/etcd /usr/local/bin/
80
+
81
+ # TODO: Remove the patched GOROOT when we have an official golang that has a working arm and ppc64le linker
82
+ ENV K8S_PATCHED_GOLANG_VERSION=1.7.1 \
83
+ K8S_PATCHED_GOROOT=/usr/local/go_k8s_patched
84
+ RUN mkdir -p ${K8S_PATCHED_GOROOT} \
85
+ && curl -sSL https://github.com/golang/go/archive/go${K8S_PATCHED_GOLANG_VERSION}.tar.gz | tar -xz -C ${K8S_PATCHED_GOROOT} --strip-components=1
86
+
87
+ COPY golang-patches/CL28857-go1.7.1-luxas.patch ${K8S_PATCHED_GOROOT}/
88
+ RUN cd ${K8S_PATCHED_GOROOT} \
89
+ && patch -p1 < CL28857-go1.7.1-luxas.patch \
90
+ && cd src \
91
+ && GOROOT_FINAL=${K8S_PATCHED_GOROOT} GOROOT_BOOTSTRAP=/usr/local/go ./make.bash \
92
+ && for platform in linux/arm; do GOOS=${platform%/*} GOARCH=${platform##*/} GOROOT=${K8S_PATCHED_GOROOT} go install std; done
Original file line number Diff line number Diff line change 1
- v1.6.3-6
1
+ v1.6.3-7
You can’t perform that action at this time.
0 commit comments