From 8dddae9daa6d2f9baa1a18d34e6881cc8c26b809 Mon Sep 17 00:00:00 2001 From: Steven Fitzpatrick Date: Fri, 7 Jan 2022 15:14:44 +0000 Subject: [PATCH] AIAP Libvirt: Add kubectl install Change-Id: I4b325958906ba723ec22ebdedb9b5607b74a2683 --- tools/airship-in-a-pod/libvirt/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/airship-in-a-pod/libvirt/Dockerfile b/tools/airship-in-a-pod/libvirt/Dockerfile index f551643c9..470d9fc22 100644 --- a/tools/airship-in-a-pod/libvirt/Dockerfile +++ b/tools/airship-in-a-pod/libvirt/Dockerfile @@ -4,6 +4,9 @@ FROM ${BASE_IMAGE} SHELL ["bash", "-exc"] ENV DEBIAN_FRONTEND noninteractive +ARG k8s_version=v1.18.3 +ARG kubectl_url=https://storage.googleapis.com/kubernetes-release/release/"${k8s_version}"/bin/linux/amd64/kubectl + RUN apt-get update ;\ apt-get dist-upgrade -y ;\ apt-get install -y \ @@ -28,7 +31,9 @@ RUN apt-get update ;\ systemctl enable libvirtd ;\ systemctl enable virtlogd ;\ echo 'user = "root"' >> /etc/libvirt/qemu.conf ;\ - echo 'group = "root"' >> /etc/libvirt/qemu.conf + echo 'group = "root"' >> /etc/libvirt/qemu.conf ;\ + curl -sSLo /usr/local/bin/kubectl "${kubectl_url}" ;\ + chmod +x /usr/local/bin/kubectl COPY assets /opt/assets/ RUN cp -ravf /opt/assets/* / ;\