From 9deae9c0bd58b5b48caa690524e7ddd88b61c227 Mon Sep 17 00:00:00 2001 From: Justin Van Patten Date: Fri, 8 Mar 2024 08:24:40 -0800 Subject: [PATCH] Migrate to the k8s community-owned repository (#185) The legacy Google-hosted package repositories have gone away. See https://kubernetes.io/blog/2023/08/15/pkgs-k8s-io-introduction/ When building the image, we now get the following error: ``` The repository 'http://apt.kubernetes.io kubernetes-xenial Release' does not have a Release file ``` This change migrates to the community-owned repository. --- docker/pulumi/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/pulumi/Dockerfile b/docker/pulumi/Dockerfile index 56b50770..6d342c2e 100644 --- a/docker/pulumi/Dockerfile +++ b/docker/pulumi/Dockerfile @@ -43,7 +43,10 @@ RUN apt-get update -y && \ echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \ echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list && \ echo "deb http://packages.cloud.google.com/apt cloud-sdk-$(lsb_release -cs) main" | tee /etc/apt/sources.list.d/google-cloud-sdk.list && \ - echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee /etc/apt/sources.list.d/kubernetes.list && \ + KUBE_LATEST=$(curl -L -s https://dl.k8s.io/release/stable.txt | awk 'BEGIN { FS="." } { printf "%s.%s", $1, $2 }') && \ + mkdir -p /etc/apt/keyrings && \ + curl -fsSL https://pkgs.k8s.io/core:/stable:/${KUBE_LATEST}/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg && \ + echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/${KUBE_LATEST}/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list && \ echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/azure.list && \ # Install second wave of dependencies apt-get update -y && \