Added seed code for caas-helm.
[ta/caas-helm.git] / docker-build / helm-builder / Dockerfile
diff --git a/docker-build/helm-builder/Dockerfile b/docker-build/helm-builder/Dockerfile
new file mode 100644 (file)
index 0000000..2b1ff95
--- /dev/null
@@ -0,0 +1,44 @@
+# Copyright 2019 Nokia
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM centos:7.6.1810
+MAINTAINER Krisztian Lengyel <krisztian.lengyel@nokia.com>
+
+ARG HELM_VERSION
+ARG go_version
+ARG binaries
+ARG go_install_dir="/usr/local/go"
+
+ENV GOBIN=/usr/local/bin
+ENV GOPATH /build
+ARG build_packages="gcc gcc-c++ glibc-devel make autoconf git which libtool"
+ENV PATH="$GOPATH/bin:$go_install_dir/bin:$PATH"
+
+RUN yum install -y --setopt=skip_missing_names_on_install=False \
+      ${build_packages} \
+&&  mkdir -p $go_install_dir \
+&&  curl -fsSL -k https://dl.google.com/go/go${go_version}.linux-amd64.tar.gz | tar zx --strip-components=1 -C ${go_install_dir} \
+\
+# Build Helm
+&&  mkdir -p $GOPATH/src/k8s.io \
+&&  cd $GOPATH/src/k8s.io \
+&&  git clone https://github.com/kubernetes/helm.git \
+&&  cd helm \
+&&  make GIT_TAG=v${HELM_VERSION} bootstrap build-cross \
+&&  mkdir -p ${binaries} \
+&&  mv ./_dist/linux-amd64/tiller ${binaries}/ \
+&&  mv ./_dist/linux-amd64/helm ${binaries}/ \
+&&  rm -rf $GOPATH \
+&&  rm -rf /build \
+&&  rm -rf /root/.glide