Add kubectl 1.17/Helm 3.5.2-based image

Signed-off-by: Takuya Noguchi <takninnovationresearch@gmail.com>
This commit is contained in:
Takuya Noguchi 2021-03-22 15:26:14 +00:00
parent 9ca0d2567b
commit cc121a93fb
2 changed files with 29 additions and 2 deletions

View file

@ -0,0 +1,27 @@
FROM ruby:3.0.0-alpine
MAINTAINER GitLab Engineering Productivity Team
ENV KUBECTL_VERSION=1.17.17
ENV HELM_VERSION=3.5.3
ENV HELM_URL=https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz
ENV HELM_HOME=/root/.helm
# Install dependencies
RUN apk --no-cache -U add openssl curl tar gzip bash ca-certificates git \
&& mkdir -p /opt
# Install kubectl
RUN wget https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \
&& install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl \
&& rm -f kubectl
# Install Helm
RUN wget -q -O - ${HELM_URL} | tar zxf - \
&& mv linux-amd64/helm /usr/bin/ \
&& chmod +x /usr/bin/helm \
&& helm version --client
# Install kubeval
RUN mkdir -p $HELM_HOME/plugins \
&& helm plugin install https://github.com/instrumenta/helm-kubeval