File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM python:3.12-slim
22
3+ ARG TARGETPLATFORM
4+
35# #
46# # Install kubectl and dependencies.
57# #
68ENV KUBE_LATEST_VERSION="v1.21.3"
79ENV HELM_VERSION="v3.6.2" \
810 VIRTUAL_ENV="/app/.venv" \
911 PATH="/app/.venv/bin:$PATH"
10- ENV TARGETARCH= ""
12+
1113
1214RUN apt-get update \
1315 && apt-get install wget ca-certificates bash git git-crypt -y --no-install-recommends \
14- # Determine target architecture and set TARGETARCH accordingly
15- && case "$(dpkg --print-architecture)" in \
16- amd64) export TARGETARCH="amd64" ;; \
17- arm64) export TARGETARCH="arm64" ;; \
18- *) echo "Unsupported architecture: $(dpkg --print-architecture)" ; exit 1 ;; \
19- esac \
20- \
2116 # Download kubectl
22- && wget -q https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/${TARGETARCH }/kubectl -O /usr/local/bin/kubectl \
17+ && wget -q https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/${TARGETPLATFORM }/kubectl -O /usr/local/bin/kubectl \
2318 && chmod +x /usr/local/bin/kubectl \
2419 \
2520 # Download helm
26- && wget -q https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETARCH }.tar.gz -O - | tar -xzO linux-${TARGETARCH }/helm > /usr/local/bin/helm \
21+ && wget -q https://get.helm.sh/helm-${HELM_VERSION}-linux-${TARGETPLATFORM }.tar.gz -O - | tar -xzO linux-${TARGETPLATFORM }/helm > /usr/local/bin/helm \
2722 && chmod +x /usr/local/bin/helm \
2823 \
2924 # Install helm-secrets plugin
3025 && helm plugin install https://github.com/jkroepke/helm-secrets --version v4.2.2 \
3126 \
3227 # Download sops
33- && wget -q https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux.${TARGETARCH } -O /usr/local/bin/sops \
28+ && wget -q https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux.${TARGETPLATFORM } -O /usr/local/bin/sops \
3429 && chmod +x /usr/local/bin/sops \
3530 \
3631 && apt-get clean \
You can’t perform that action at this time.
0 commit comments