From 75041a1a2b7bf0e27be07730e262282e76a0300e Mon Sep 17 00:00:00 2001 From: Kevin Pelzel Date: Thu, 14 Mar 2024 12:25:53 -0500 Subject: [PATCH] add targetarch and targetos to dockerfile --- testsuite/integration/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testsuite/integration/Dockerfile b/testsuite/integration/Dockerfile index d400ad9..96fcbc2 100644 --- a/testsuite/integration/Dockerfile +++ b/testsuite/integration/Dockerfile @@ -2,6 +2,9 @@ FROM rockylinux:9 AS testbase COPY requirements.txt /requirements.txt +ARG TARGETARCH +ARG TARGETOS + RUN sed -i 's/^mirrorlist/#mirrorlist/g' /etc/yum.repos.d/rocky* && \ sed -i 's|^#baseurl=|baseurl=|' /etc/yum.repos.d/rocky* @@ -13,7 +16,7 @@ RUN yum update -y && \ dnf check-update && \ dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo && \ dnf install -y docker-ce-cli && \ - curl -k -LO "https://dl.k8s.io/release/$(curl -k -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \ + curl -k -LO "https://dl.k8s.io/release/$(curl -k -L -s https://dl.k8s.io/release/stable.txt)/bin/${TARGETOS}/${TARGETARCH}/kubectl" && \ install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl && \ pip install -r requirements.txt