This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARG arch= | |
FROM alpine:3.13.5 | |
ENV KUSTOMIZE_VER 4.1.2 | |
ENV KUBECTL_VER 1.19.2 | |
RUN echo $arch | |
RUN apk --no-cache add curl gettext | |
RUN export arch=`ls -1 /lib/ | grep 64 | sed "s/64.*/64/" |cut -f3 -d"-" | grep 64 |head -n1`; if [ $arch = "aarch64" ]; then arch="arm64"; elif [ $arch = "x86_64" ]; then arch="amd64"; else arch=$arch; fi; curl -L https://storage.googleapis.com/kubernetes-release/release/v${KUSTOMIZE_VER}/bin/linux/$arch/kubectl -o /usr/bin/kustomize \ | |
&& chmod +x /usr/bin/kustomize && curl -L https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VER}/bin/linux/$arch/kubectl -o /usr/bin/kubectl \ | |
&& chmod +x /usr/bin/kubectl |