From b0ee0172beed2230ac4415704f175b58d9322707 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Wed, 26 Jan 2022 18:00:33 +0100 Subject: [PATCH] Improve dockerfile This way the layer cache will work, while properly detecting new kubectl releases --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3e34766..00bdaab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,8 +2,9 @@ FROM python:3.10 LABEL maintainer="Stéphane Bidoul" +ADD https://dl.k8s.io/release/stable.txt /tmp/kubectl-version.txt RUN curl -L \ - "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \ + "https://dl.k8s.io/release/$(cat /tmp/kubectl-version.txt)/bin/linux/amd64/kubectl" \ -o /usr/local/bin/kubectl \ && chmod +x /usr/local/bin/kubectl