2024-09-07 00:02:52 +00:00
|
|
|
FROM docker.io/alpine:3.20@sha256:beefdbd8a1da6d2915566fde36db9db0b524eb737fc57cd1367effd16dc0d06d
|
2022-12-22 11:14:19 +00:00
|
|
|
|
|
|
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
|
|
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
|
|
|
LABEL org.opencontainers.image.title="kube-tools"
|
2023-11-08 08:02:47 +00:00
|
|
|
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
|
2022-12-22 11:14:19 +00:00
|
|
|
|
|
|
|
ARG KUBECTL_VERSION
|
|
|
|
ARG YQ_VERSION
|
|
|
|
ARG HELM_VERSION
|
|
|
|
ARG KUSTOMIZE_VERSION
|
|
|
|
ARG KUBECONFORM_VERSION
|
2023-07-09 12:11:11 +00:00
|
|
|
ARG POLARIS_VERSION
|
2024-01-06 14:01:50 +00:00
|
|
|
ARG FLUX_LOCAL_VERSION
|
|
|
|
ARG FLUX_VERSION
|
2022-12-22 11:14:19 +00:00
|
|
|
|
2024-03-26 09:36:36 +00:00
|
|
|
# renovate: datasource=github-releases depName=hairyhenderson/gomplate
|
2024-07-08 10:00:52 +00:00
|
|
|
ENV GOMPLATE_VERSION="${GOMPLATE_VERSION:-v4.1.0}"
|
2022-12-22 11:14:19 +00:00
|
|
|
# renovate: datasource=github-releases depName=kubernetes/kubernetes
|
2024-09-12 01:32:39 +00:00
|
|
|
ENV KUBECTL_VERSION="${KUBECTL_VERSION:-v1.31.1}"
|
2022-12-22 11:14:19 +00:00
|
|
|
# renovate: datasource=github-releases depName=mikefarah/yq
|
2024-08-05 07:33:45 +00:00
|
|
|
ENV YQ_VERSION="${YQ_VERSION:-v4.44.3}"
|
2022-12-22 11:14:19 +00:00
|
|
|
# renovate: datasource=github-releases depName=helm/helm
|
2024-10-09 20:02:09 +00:00
|
|
|
ENV HELM_VERSION="${HELM_VERSION:-v3.16.2}"
|
2022-12-22 11:14:19 +00:00
|
|
|
# renovate: datasource=github-releases depName=kubernetes-sigs/kustomize
|
2024-10-09 13:32:00 +00:00
|
|
|
ENV KUSTOMIZE_VERSION="${KUSTOMIZE_VERSION:-v5.5.0}"
|
2022-12-22 11:14:19 +00:00
|
|
|
# renovate: datasource=github-releases depName=yannh/kubeconform
|
2024-07-31 08:50:36 +00:00
|
|
|
ENV KUBECONFORM_VERSION="${KUBECONFORM_VERSION:-v0.6.7}"
|
2023-07-09 12:11:11 +00:00
|
|
|
# renovate: datasource=github-releases depName=FairwindsOps/polaris
|
2024-10-27 12:32:03 +00:00
|
|
|
ENV POLARIS_VERSION="${POLARIS_VERSION:-9.5.0}"
|
2023-07-09 12:11:11 +00:00
|
|
|
# renovate: datasource=pypi depName=flux-local
|
2024-10-13 18:27:32 +00:00
|
|
|
ENV FLUX_LOCAL_VERSION="${FLUX_LOCAL_VERSION:-6.0.0}"
|
2024-01-06 14:01:50 +00:00
|
|
|
# renovate: datasource=github-releases depName=fluxcd/flux2
|
2024-09-30 17:02:02 +00:00
|
|
|
ENV FLUX_VERSION="${FLUX_VERSION:-v2.4.0}"
|
2022-12-22 11:14:19 +00:00
|
|
|
|
2023-12-14 09:47:31 +00:00
|
|
|
ENV PIPX_HOME=/opt/pipx
|
|
|
|
ENV PIPX_BIN_DIR=/usr/local/bin
|
|
|
|
|
2024-03-26 09:12:35 +00:00
|
|
|
RUN apk --update add curl tar make bash python3 py3-yaml pipx findutils git && \
|
2023-11-14 14:27:23 +00:00
|
|
|
apk --no-cache upgrade libcrypto3 libssl3 && \
|
2023-12-14 09:47:31 +00:00
|
|
|
pipx install --include-deps flux-local=="$FLUX_LOCAL_VERSION" && \
|
|
|
|
pipx inject flux-local PyYAML && \
|
|
|
|
$PIPX_HOME/shared/bin/pip install -U pip setuptools && \
|
2023-11-08 08:02:47 +00:00
|
|
|
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}" && \
|
2024-03-26 09:36:36 +00:00
|
|
|
curl -SsfL -o /usr/local/bin/gomplate "https://github.com/hairyhenderson/gomplate/releases/download/${GOMPLATE_VERSION}/gomplate_${TARGETOS}-${TARGETARCH}${TARGETVARIANT}" && \
|
2024-03-26 08:44:32 +00:00
|
|
|
curl -SsfL -o /usr/local/bin/openapi2jsonschema "https://raw.githubusercontent.com/yannh/kubeconform/${KUBECONFORM_VERSION}/scripts/openapi2jsonschema.py" && \
|
2023-11-08 08:02:47 +00:00
|
|
|
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" \
|
2022-12-22 11:14:19 +00:00
|
|
|
| tar xz -C /usr/local/bin kustomize && \
|
2023-11-08 08:02:47 +00:00
|
|
|
curl -SsfL "https://github.com/yannh/kubeconform/releases/download/${KUBECONFORM_VERSION}/kubeconform-${TARGETOS}-${TARGETARCH}.tar.gz" \
|
2022-12-22 11:14:19 +00:00
|
|
|
| tar xz -C /usr/local/bin kubeconform && \
|
2023-11-08 08:02:47 +00:00
|
|
|
curl -SsfL "https://github.com/FairwindsOps/polaris/releases/download/${POLARIS_VERSION}/polaris_${TARGETOS}_${TARGETARCH}.tar.gz" \
|
2023-07-09 12:11:11 +00:00
|
|
|
| tar xz -C /usr/local/bin polaris && \
|
2024-01-06 14:01:50 +00:00
|
|
|
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 && \
|
2022-12-22 11:14:19 +00:00
|
|
|
chmod 755 /usr/local/bin/kubectl && \
|
|
|
|
chmod 755 /usr/local/bin/kubectl-convert && \
|
|
|
|
chmod 755 /usr/local/bin/yq && \
|
2024-03-26 09:36:36 +00:00
|
|
|
chmod 755 /usr/local/bin/gomplate && \
|
2024-03-26 08:44:32 +00:00
|
|
|
chmod 755 /usr/local/bin/openapi2jsonschema && \
|
2022-12-22 11:14:19 +00:00
|
|
|
chmod 755 /usr/local/bin/helm && \
|
|
|
|
chmod 755 /usr/local/bin/kustomize && \
|
|
|
|
chmod 755 /usr/local/bin/kubeconform && \
|
|
|
|
rm -rf /var/cache/apk/* && \
|
2023-12-14 09:47:31 +00:00
|
|
|
rm -rf /tmp/* && \
|
|
|
|
rm -rf /root/.cache/
|
2022-12-22 11:14:19 +00:00
|
|
|
|
|
|
|
ADD overlay/ /
|
|
|
|
|
|
|
|
STOPSIGNAL SIGTERM
|
|
|
|
|
|
|
|
CMD []
|