From 1d8f9ead64f709d017298fc1745945db0c675727 Mon Sep 17 00:00:00 2001 From: Sayan Chowdhury Date: Fri, 21 Jul 2023 17:00:40 +0530 Subject: [PATCH 1/2] Dockerfile: Include packer and make for CAPI SIG images Signed-off-by: Sayan Chowdhury --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 499ff2f3a..0982d9584 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,11 @@ RUN bash -c 'cd /usr/src/mantle && ./build ; mv bin bin-amd64 ; CGO_ENABLED=0 GO # See comment above about golang:1.20 why debian:12 is set here FROM docker.io/library/debian:12 -RUN apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y qemu-utils qemu-system-x86 qemu-system-aarch64 qemu-efi-aarch64 seabios ovmf lbzip2 sudo dnsmasq gnupg2 git curl iptables nftables dns-root-data ca-certificates sqlite3 jq awscli azure-cli +RUN apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y qemu-utils qemu-system-x86 qemu-system-aarch64 qemu-efi-aarch64 seabios ovmf lbzip2 sudo dnsmasq gnupg2 git curl iptables nftables dns-root-data ca-certificates sqlite3 jq awscli azure-cli make # from https://cloud.google.com/storage/docs/gsutil_install#deb RUN echo "deb http://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list && curl -fsSLo /etc/apt/trusted.gpg.d/cloud.google.gpg https://dl.k8s.io/apt/doc/apt-key.gpg && apt-get update -y && apt-get install --no-install-recommends -y python3 && apt-get install -y google-cloud-cli +# install packer +RUN curl -fsSL https://apt.releases.hashicorp.com/gpg | gpg --yes --dearmor -o /etc/apt/trusted.gpg.d/hashicorp-keyring.gpg && echo "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/hashicorp-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/hashicorp.list && apt-get update -y && apt-get install --no-install-recommends -y packer COPY --from=builder-amd64 /usr/src/mantle/bin-amd64 /usr/local/bin-amd64 COPY --from=builder-amd64 /usr/src/mantle/bin-arm64 /usr/local/bin-arm64 RUN bash -c 'if [ "$(uname -m)" == "x86_64" ]; then rm -rf /usr/local/bin /usr/local/bin-arm64 ; mv /usr/local/bin-amd64 /usr/local/bin ; else rm -rf /usr/local/bin /usr/local/bin-amd64 ; mv /usr/local/bin-arm64 /usr/local/bin ; fi' From 01d9f7ebaccab24169f5b1afda2f4886bc51ef52 Mon Sep 17 00:00:00 2001 From: Sayan Chowdhury Date: Thu, 27 Jul 2023 22:53:23 +0530 Subject: [PATCH 2/2] Add the python3-pip Signed-off-by: Sayan Chowdhury --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0982d9584..61a7b1555 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ RUN bash -c 'cd /usr/src/mantle && ./build ; mv bin bin-amd64 ; CGO_ENABLED=0 GO # See comment above about golang:1.20 why debian:12 is set here FROM docker.io/library/debian:12 -RUN apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y qemu-utils qemu-system-x86 qemu-system-aarch64 qemu-efi-aarch64 seabios ovmf lbzip2 sudo dnsmasq gnupg2 git curl iptables nftables dns-root-data ca-certificates sqlite3 jq awscli azure-cli make +RUN apt-get update && apt-get upgrade -y && apt-get install --no-install-recommends -y qemu-utils qemu-system-x86 qemu-system-aarch64 qemu-efi-aarch64 seabios ovmf lbzip2 sudo dnsmasq gnupg2 git curl iptables nftables dns-root-data ca-certificates sqlite3 jq awscli azure-cli make python3-pip # from https://cloud.google.com/storage/docs/gsutil_install#deb RUN echo "deb http://packages.cloud.google.com/apt cloud-sdk main" > /etc/apt/sources.list.d/google-cloud-sdk.list && curl -fsSLo /etc/apt/trusted.gpg.d/cloud.google.gpg https://dl.k8s.io/apt/doc/apt-key.gpg && apt-get update -y && apt-get install --no-install-recommends -y python3 && apt-get install -y google-cloud-cli # install packer