FROM bitnami/kubectl:1.22 USER root RUN apt-get update && \ apt-get install -y git && \ rm -r /var/lib/apt/lists /var/cache/apt/archives RUN mkdir -p /tmp/krew && chown 1001 /tmp/krew RUN mkdir -p /.krew && chown 1001 /.krew ADD check_full_pvs.sh / RUN chmod g+rwX /check_full_pvs.sh USER 1001 RUN cd /tmp/krew && curl -fsSLO "https://github.com/kubernetes-sigs/krew/releases/latest/download/krew-linux_amd64.tar.gz" && \ tar zxvf "krew-linux_amd64.tar.gz" && ./krew-linux_amd64 install krew && rm -f krew-linux_amd64* ENV PATH="$HOME/.krew/bin:/opt/bitnami:$PATH" RUN kubectl krew install df-pv ENTRYPOINT [ "/check_full_pvs.sh" ]