From 87665e1f4959f510df4919a743324aee538b4fc8 Mon Sep 17 00:00:00 2001 From: Fabio Rauber Date: Fri, 22 Apr 2022 14:46:00 -0300 Subject: [PATCH] Added Dockerfile --- Dockerfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..c581848 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +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" ]