From bf34d6205185ce20057bfd31f6cd66dbcc8b2030 Mon Sep 17 00:00:00 2001 From: Kat Morgan Date: Wed, 10 Jan 2024 21:48:27 -0800 Subject: [PATCH] add kind kubernetes-in-docker for faster codespaces startup --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index 14156b1..c1a3834 100644 --- a/Dockerfile +++ b/Dockerfile @@ -80,6 +80,16 @@ RUN set -ex \ /tmp/* \ && true +# Install Kind Kubernetes-in-Docker +RUN set -ex \ + && export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "amd64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \ + && export varVerKind=$(curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | awk -F '["v,]' '/tag_name/{print $5}') \ + && export varUrlKind="https://github.com/kubernetes-sigs/kind/releases/download/v${varVerKind}/kind-linux-${arch}" \ + && sudo curl --output /usr/bin/kind -L ${varUrlKind} \ + && sudo chmod +x /usr/bin/kind \ + && /usr/bin/kind version \ + && true + # Install pulumi RUN set -ex \ && export arch=$(uname -m | awk '{ if ($1 == "x86_64") print "x64"; else if ($1 == "aarch64" || $1 == "arm64") print "arm64"; else print "unknown" }') \