From 7631364d50b7c0b28a0c8b5f40319eeb679422a1 Mon Sep 17 00:00:00 2001 From: hongming Date: Wed, 13 Mar 2024 16:45:24 +0800 Subject: [PATCH] Revert "feat: support helm plugin mapkubeapis" --- Dockerfile | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 94eeba8..61fe175 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,7 @@ -FROM alpine:3.18.2 +From alpine:3.18.2 ARG KUBECTL_VERSION=v1.27.4 ARG HELM_VERSION=v3.12.2 -ARG KUSTOMIZE_VERSION=v5.1.0 ARG TARGETOS ARG TARGETARCH @@ -15,27 +14,19 @@ RUN apk update && apk add \ curl \ wget \ tcpdump \ - git \ ca-certificates && \ update-ca-certificates && \ rm -rf /var/cache/apk/* && \ + curl -LO https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/${TARGETOS}/${TARGETARCH}/kubectl && \ + chmod +x ./kubectl && \ + mv ./kubectl /usr/local/bin/kubectl && \ + echo -e 'source /usr/share/bash-completion/bash_completion\nsource <(kubectl completion bash)' >>~/.bashrc && \ curl -SsLO https://get.helm.sh/helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz && \ - tar xf helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz -C /usr/local/bin && \ + tar xf helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz -C /usr/local/bin && \ mv /usr/local/bin/${TARGETOS}-${TARGETARCH}/helm /usr/local/bin && \ rm helm-${HELM_VERSION}-${TARGETOS}-${TARGETARCH}.tar.gz && \ - rm -rf /usr/local/bin/${TARGETOS}-${TARGETARCH} && \ - helm plugin install https://github.com/helm/helm-mapkubeapis && \ - apk del git - -RUN curl -LO https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/${TARGETOS}/${TARGETARCH}/kubectl && \ - chmod +x ./kubectl && \ - mv ./kubectl /usr/local/bin/kubectl && \ - echo -e 'source /usr/share/bash-completion/bash_completion\nsource <(kubectl completion bash)' >>~/.bashrc - -RUN curl -SsLO https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize/${KUSTOMIZE_VERSION}/kustomize_${KUSTOMIZE_VERSION}_${TARGETOS}_${TARGETARCH}.tar.gz && \ - tar xvzf kustomize_${KUSTOMIZE_VERSION}_${TARGETOS}_${TARGETARCH}.tar.gz && \ - mv kustomize /usr/local/bin/ && \ - rm kustomize_${KUSTOMIZE_VERSION}_${TARGETOS}_${TARGETARCH}.tar.gz + rm -rf /usr/local/bin/${TARGETOS}-${TARGETARCH} + COPY entrypoint.sh /usr/local/bin/entrypoint.sh