From 0923bb7500ac8361efbbf0356e15e77b24dbaaa8 Mon Sep 17 00:00:00 2001 From: ange Date: Fri, 10 May 2024 12:39:43 +0200 Subject: [PATCH] feat: kubectl --- debian/Dockerfile | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/Dockerfile b/debian/Dockerfile index 9a76701..ed414b5 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -1,3 +1,13 @@ +FROM debian:12-slim as kubectl +ENV DEBIAN_FRONTEND=noninteractive +RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + curl \ + && rm -rf /var/lib/apt/lists/* +RUN V="$(curl -sSL https://dl.k8s.io/release/stable.txt)" \ + && curl -sSL \ + -o /kubectl "https://dl.k8s.io/release/$V/bin/linux/amd64/kubectl" + FROM debian:12-slim ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -6,5 +16,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ git \ jq \ && rm -rf /var/lib/apt/lists/* +COPY --from=kubectl --chmod=0755 /kubectl /usr/local/bin/kubectl RUN useradd -m app USER app