This repository was archived by the owner on Jul 31, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 55
66FROM ubuntu:22.04 as setup
77
8+ ARG TARGETARCH
9+ ENV TARGETARCH=amd64
10+
811RUN DEBIAN_FRONTEND=noninteractive \
912 apt-get update && apt-get upgrade -y && \
1013 apt-get install -yq --no-install-recommends \
@@ -34,20 +37,17 @@ RUN DEBIAN_FRONTEND=noninteractive \
3437# ######### add kubernetes cli tools ############################################
3538
3639# kubectl
37- RUN curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg && \
38- echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list && \
39- apt-get update && \
40- apt-get install -y kubectl
40+ RUN echo target architecture is ${TARGETARCH} && \
41+ curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/${TARGETARCH}/kubectl" && \
42+ install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
4143
4244# helm
43- RUN curl https://baltocdn.com/helm/signing.asc | gpg --dearmor | tee /usr/share/keyrings/helm.gpg > /dev/null && \
44- apt-get install apt-transport-https --yes && \
45- echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/helm.gpg] https://baltocdn.com/helm/stable/debian/ all main" | tee /etc/apt/sources.list.d/helm-stable-debian.list && \
46- apt-get update && \
47- apt-get install helm
45+ RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \
46+ chmod 700 get_helm.sh && \
47+ ./get_helm.sh
4848
4949# oidc-login
50- RUN curl -L https://github.com/int128/kubelogin/releases/download/v1.25.3/kubelogin_linux_amd64 .zip --output /tmp/kubelogin.zip && \
50+ RUN curl -L " https://github.com/int128/kubelogin/releases/download/v1.27.0/kubelogin_linux_${TARGETARCH} .zip" --output /tmp/kubelogin.zip && \
5151 unzip /tmp/kubelogin.zip kubelogin && \
5252 mv kubelogin /usr/local/bin/kubectl-oidc_login
5353
You can’t perform that action at this time.
0 commit comments