FROM docker.io/alpine:3.20@sha256:77726ef6b57ddf65bb551896826ec38bc3e53f75cdde31354fbffb4f25238ebd LABEL maintainer="Robert Kaussow " LABEL org.opencontainers.image.authors="Robert Kaussow " LABEL org.opencontainers.image.title="kube-tools" LABEL org.opencontainers.image.url="https://gitea.rknet.org/container/kube-tools" LABEL org.opencontainers.image.source="https://gitea.rknet.org/container/kube-tools" LABEL org.opencontainers.image.documentation="https://gitea.rknet.org/container/kube-tools" ARG TARGETOS ARG TARGETARCH ARG TARGETVARIANT ARG KUBECTL_VERSION ARG YQ_VERSION ARG HELM_VERSION ARG KUSTOMIZE_VERSION ARG KUBECONFORM_VERSION ARG POLARIS_VERSION ARG FLUX_LOCAL_VERSION ARG FLUX_VERSION # renovate: datasource=github-releases depName=hairyhenderson/gomplate ENV GOMPLATE_VERSION="${GOMPLATE_VERSION:-v3.11.8}" # renovate: datasource=github-releases depName=kubernetes/kubernetes ENV KUBECTL_VERSION="${KUBECTL_VERSION:-v1.30.1}" # renovate: datasource=github-releases depName=mikefarah/yq ENV YQ_VERSION="${YQ_VERSION:-v4.44.1}" # renovate: datasource=github-releases depName=helm/helm ENV HELM_VERSION="${HELM_VERSION:-v3.15.1}" # renovate: datasource=github-releases depName=kubernetes-sigs/kustomize ENV KUSTOMIZE_VERSION="${KUSTOMIZE_VERSION:-v5.4.2}" # renovate: datasource=github-releases depName=yannh/kubeconform ENV KUBECONFORM_VERSION="${KUBECONFORM_VERSION:-v0.6.6}" # renovate: datasource=github-releases depName=FairwindsOps/polaris ENV POLARIS_VERSION="${POLARIS_VERSION:-9.0.1}" # renovate: datasource=pypi depName=flux-local ENV FLUX_LOCAL_VERSION="${FLUX_LOCAL_VERSION:-5.3.1}" # renovate: datasource=github-releases depName=fluxcd/flux2 ENV FLUX_VERSION="${FLUX_VERSION:-v2.3.0}" ENV PIPX_HOME=/opt/pipx ENV PIPX_BIN_DIR=/usr/local/bin RUN apk --update add curl tar make bash python3 py3-yaml pipx findutils git && \ apk --no-cache upgrade libcrypto3 libssl3 && \ pipx install --include-deps flux-local=="$FLUX_LOCAL_VERSION" && \ pipx inject flux-local PyYAML && \ $PIPX_HOME/shared/bin/pip install -U pip setuptools && \ curl -SsfL -o /usr/local/bin/kubectl "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/${TARGETOS}/${TARGETARCH}/kubectl" && \ curl -SsfL -o /usr/local/bin/kubectl-convert "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/${TARGETOS}/${TARGETARCH}/kubectl-convert" && \ curl -SsfL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_${TARGETOS}_${TARGETARCH}" && \ curl -SsfL -o /usr/local/bin/gomplate "https://github.com/hairyhenderson/gomplate/releases/download/${GOMPLATE_VERSION}/gomplate_${TARGETOS}-${TARGETARCH}${TARGETVARIANT}" && \ curl -SsfL -o /usr/local/bin/openapi2jsonschema "https://raw.githubusercontent.com/yannh/kubeconform/${KUBECONFORM_VERSION}/scripts/openapi2jsonschema.py" && \ curl -SsfL "https://get.helm.sh/helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz" \ | tar xz --strip-components=1 -C /usr/local/bin "${TARGETOS}-${TARGETARCH}/helm" && \ curl -SsfL "https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2F${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_${TARGETOS}_${TARGETARCH}.tar.gz" \ | tar xz -C /usr/local/bin kustomize && \ curl -SsfL "https://github.com/yannh/kubeconform/releases/download/${KUBECONFORM_VERSION}/kubeconform-${TARGETOS}-${TARGETARCH}.tar.gz" \ | tar xz -C /usr/local/bin kubeconform && \ curl -SsfL "https://github.com/FairwindsOps/polaris/releases/download/${POLARIS_VERSION}/polaris_${TARGETOS}_${TARGETARCH}.tar.gz" \ | tar xz -C /usr/local/bin polaris && \ curl -SsfL "https://github.com/fluxcd/flux2/releases/download/${FLUX_VERSION}/flux_${FLUX_VERSION##v}_${TARGETOS}_${TARGETARCH}.tar.gz" \ | tar xz -C /usr/local/bin flux && \ chmod 755 /usr/local/bin/kubectl && \ chmod 755 /usr/local/bin/kubectl-convert && \ chmod 755 /usr/local/bin/yq && \ chmod 755 /usr/local/bin/gomplate && \ chmod 755 /usr/local/bin/openapi2jsonschema && \ chmod 755 /usr/local/bin/helm && \ chmod 755 /usr/local/bin/kustomize && \ chmod 755 /usr/local/bin/kubeconform && \ rm -rf /var/cache/apk/* && \ rm -rf /tmp/* && \ rm -rf /root/.cache/ ADD overlay/ / STOPSIGNAL SIGTERM CMD []