3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
18 ARG KUBERNETES_VERSION
20 ARG go_install_dir="/usr/local/go"
23 ARG build_packages="gcc gcc-c++ glibc-devel make autoconf git which libtool"
24 ENV GOROOT_BOOTSTRAP="$go_install_dir"
26 ENV PATH="$GOPATH/bin:$go_install_dir/bin:$PATH"
30 && yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm \
31 && yum install -y --setopt=skip_missing_names_on_install=False \
43 && mkdir -p ${go_install_dir} \
44 && curl -fsSL -k https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz | tar zx --strip-components=1 -C ${go_install_dir} \
48 && mkdir -p ${GOPATH}/src/github.com/kubernetes/kubernetes \
49 && curl -fsSL https://github.com/kubernetes/kubernetes/archive/v${KUBERNETES_VERSION}.tar.gz | tar zx --strip-components=1 -C ${GOPATH}/src/github.com/kubernetes/kubernetes \
50 && cd ${GOPATH}/src/github.com/kubernetes/kubernetes \
51 && make WHAT="cmd/kubelet" \
52 && make WHAT="cmd/kubectl" \
53 && make WHAT="cmd/kube-apiserver" \
54 && make WHAT="cmd/kube-controller-manager" \
55 && make WHAT="cmd/kube-proxy" \
56 && make WHAT="cmd/kube-scheduler" \
57 && mkdir -p ${binaries} \
58 && mv ./_output/local/bin/linux/amd64/{kubelet,kubectl,kube-apiserver,kube-controller-manager,kube-proxy,kube-scheduler} ${binaries}/ \