From 82a9a2ef0ae5142e7d35653eb8eef3bae46a5bc2 Mon Sep 17 00:00:00 2001 From: Tolfx Date: Wed, 29 Nov 2023 10:55:31 +0100 Subject: [PATCH] Add kubectl installation to Dockerfile --- Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index de58c94..a77afac 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,10 @@ FROM alpine:latest -RUN apk add --no-cache bash kubectl +RUN apk add --no-cache bash +# Install kubectl +RUN apk add --no-cache curl && \ + curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ + install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \ + apk del curl COPY restart.sh /restart.sh RUN chmod +x /restart.sh CMD ["/restart.sh"]