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 ADD centos-7-docker.tar.xz /
19 MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
24 ARG go_install_dir="/usr/local/go"
26 ENV GOBIN=/usr/local/bin
28 ARG build_packages="gcc gcc-c++ glibc-devel make autoconf git which libtool"
29 ENV PATH="$GOPATH/bin:$go_install_dir/bin:$PATH"
31 RUN yum install -y --setopt=skip_missing_names_on_install=False \
33 && mkdir -p $go_install_dir \
34 && if [ $(uname -m) == 'aarch64' ]; then HOST_ARCH=arm64; else HOST_ARCH=amd64; fi \
35 && curl -fsSL -k https://dl.google.com/go/go${go_version}.linux-${HOST_ARCH}.tar.gz | tar zx --strip-components=1 -C ${go_install_dir} \
38 && mkdir -p $GOPATH/src/k8s.io \
39 && cd $GOPATH/src/k8s.io \
40 && git clone https://github.com/kubernetes/helm.git \
42 && make GIT_TAG=v${HELM_VERSION} bootstrap build-cross \
43 && mkdir -p ${binaries} \
44 && mv ./_dist/linux-${HOST_ARCH}/tiller ${binaries}/ \
45 && mv ./_dist/linux-${HOST_ARCH}/helm ${binaries}/ \
47 && rm -rf $go_install_dir \
49 && rm -rf /root/.glide