Skip to content

Commit

Permalink
Add yq, kustomize and kubeconform
Browse files Browse the repository at this point in the history
  • Loading branch information
maeb committed Apr 28, 2023
1 parent e3ec552 commit 05214df
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
33 changes: 26 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,54 @@ WORKDIR /tmp

# Install kubectl, see https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/
# Release info is found at: https://github.com/kubernetes/kubectl/releases
ARG KUBECTL_VERSION="v1.25.8"
ARG KUBECTL_VERSION="v1.25.9"
ENV KUBECTL="https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
ADD ${KUBECTL} .
RUN install kubectl /usr/local/bin

# Install helm
# Release info is found at: https://github.com/helm/helm/releases
ARG HELM_VERSION="v3.11.2"
ARG HELM_VERSION="v3.11.3"
ENV HELM="https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz"
ADD ${HELM} .
RUN tar xvzf helm-${HELM_VERSION}-linux-amd64.tar.gz \
&& install linux-amd64/helm /usr/local/bin

# Install veidemannctl

ARG VEIDEMANNCTL_VERSION=0.4.1
ENV VEIDEMANNCTL="https://github.com/nlnwa/veidemannctl/releases/download/v${VEIDEMANNCTL_VERSION}/veidemannctl_${VEIDEMANNCTL_VERSION}_linux_amd64"
ADD ${VEIDEMANNCTL} veidemannctl
RUN install veidemannctl /usr/local/bin/veidemannctl

# Install yq
ARG YQ_VERSION="v4.33.3"
ENV YQ="https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64"
ADD ${YQ} yq
RUN install yq /usr/local/bin/yq

# Install kustomize
ARG KUSTOMIZE_VERSION="v5.0.1"
ENV KUSTOMIZE="https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz"
ADD ${KUSTOMIZE} .
RUN tar xvzf kustomize_${KUSTOMIZE_VERSION}_linux_amd64.tar.gz \
&& install kustomize /usr/local/bin

# Install kubeconform
ARG KUBECONFORM_VERSION="v0.6.1"
ENV KUBECONFORM="https://github.com/yannh/kubeconform/releases/download/${KUBECONFORM_VERSION}/kubeconform-linux-amd64.tar.gz"
ADD ${KUBECONFORM} .
RUN tar xvzf kubeconform-linux-amd64.tar.gz \
&& install kubeconform /usr/local/bin


FROM debian:bullseye-slim

LABEL maintainer="Marius André Elsfjordstrand Beck <[email protected]>"

# Install ca-certificates
RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends ca-certificates \
RUN DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build /usr/local/bin/kubectl /usr/local/bin/kubectl
COPY --from=build /usr/local/bin/helm /usr/local/bin/helm
COPY --from=build /usr/local/bin/veidemannctl /usr/local/bin/veidemannctl
COPY --from=build /usr/local/bin/* /usr/local/bin/
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

![release](https://github.com/nlnwa/k8s-util/actions/workflows/release.yml/badge.svg)

Vanilla alpine docker image with:
debian:bullseye-slim base image with:
- helm
- kubectl
- yq
- kustomize
- kubeconform
- veidemannctl

0 comments on commit 05214df

Please sign in to comment.