From 12d0a90d4524c15cf893dcbd3016a9fbfea7aa00 Mon Sep 17 00:00:00 2001 From: Robert Vasek Date: Mon, 24 Feb 2025 11:41:06 +0100 Subject: [PATCH] Dockerfile: fix constructing URL for kubectl `go list -m -json k8s.io/kubernetes | jq -r .Version` outputs a version string in format "v0..", but binaries at dl.k8s.io/release are versioned in line with real K8s versions. This commit replaces the "v0" part with "v1" so that the URL is correct. On-behalf-of: SAP robert.vasek@sap.com Signed-off-by: Robert Vasek --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a2341a40b58..32f37eae826 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,7 +35,7 @@ COPY cli/go.sum cli/go.sum USER 0 # Install kubectl. -RUN wget "https://dl.k8s.io/release/$(go list -m -json k8s.io/kubernetes | jq -r .Version)/bin/linux/$(uname -m | sed 's/aarch.*/arm64/;s/armv8.*/arm64/;s/x86_64/amd64/')/kubectl" -O bin/kubectl && chmod +x bin/kubectl +RUN wget "https://dl.k8s.io/release/$(go list -m -json k8s.io/kubernetes | jq -r .Version | sed 's/^v0/v1/')/bin/linux/$(uname -m | sed 's/aarch.*/arm64/;s/armv8.*/arm64/;s/x86_64/amd64/')/kubectl" -O bin/kubectl && chmod +x bin/kubectl # Cache deps before building and copying source so that we don't need to re-download as much # and so that source changes don't invalidate our downloaded layer