From 10d0c20b3dc553d3a23df5f965776f9f059f8da0 Mon Sep 17 00:00:00 2001 From: Thom Carlin Date: Thu, 25 Apr 2024 08:06:09 -0400 Subject: [PATCH 1/2] Update container-builder to CentOS stream 9 --- .../container-builder/Containerfile | 32 ++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/tests/environments/container-builder/Containerfile b/tests/environments/container-builder/Containerfile index 4e9f54ca4..d025a510a 100644 --- a/tests/environments/container-builder/Containerfile +++ b/tests/environments/container-builder/Containerfile @@ -1,7 +1,7 @@ -FROM centos:8 +FROM centos:stream9 -# Python options = [3.8, 3.9] -ARG PYTHON_VERSION=3.8 +# Python options = [3.9, 3.11, 3.12] +ARG PYTHON_VERSION=3.11 ENV PATH=${PATH}:/usr/local/go/bin @@ -10,13 +10,20 @@ RUN set -x \ && dnf update -y \ # Receptor build tools && dnf install -y \ - git wget make iproute openssl findutils virtualenv \ + findutils \ + git \ + iproute \ + make \ + openssl \ + wget \ # Install specific python version - && export PYTHON_PKG_NAME=python$(echo ${PYTHON_VERSION} | sed 's/\.//g') \ - && dnf module install -y ${PYTHON_PKG_NAME} \ - && alternatives --set python /usr/bin/python${PYTHON_VERSION} \ + && dnf install -y \ + python${PYTHON_VERSION} \ + python${PYTHON_VERSION}-pip \ + && pip${PYTHON_VERSION} install virtualenv \ # Install specific golang version - && dnf install -y golang \ + && dnf install -y \ + golang \ && dnf clean all # --- ALL IMAGE MUST BE THE SAME UNTIL NOW --- @@ -25,8 +32,8 @@ RUN set -x \ WORKDIR /dependencies ADD ./go.mod \ ./go.sum \ - ./receptorctl/requirements/tests.txt \ - ./receptorctl/requirements/tests.in ./ + ../receptorctl/requirements/tests.txt \ + ../receptorctl/requirements/tests.in ./ RUN set -x \ # Go && go get -u golang.org/x/lint/golint \ @@ -34,7 +41,10 @@ RUN set -x \ # Python && virtualenv -p python${PYTHON_VERSION} /opt/venv \ && source /opt/venv/bin/activate \ - && pip3 install --upgrade -r requirements/tests.in -c requirements/tests.txt + && pip${PYTHON_VERSION} install \ + --upgrade \ + -r tests.in \ + -c tests.txt ADD ./tests/environments/container-builder/build-artifacts.sh / From 0752a78bbba51f77ddff6f9f29cd0275d0b50597 Mon Sep 17 00:00:00 2001 From: Thom Carlin Date: Thu, 25 Apr 2024 10:44:39 -0400 Subject: [PATCH 2/2] Address reviewer comment --- tests/environments/container-builder/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/environments/container-builder/Containerfile b/tests/environments/container-builder/Containerfile index d025a510a..a860677e7 100644 --- a/tests/environments/container-builder/Containerfile +++ b/tests/environments/container-builder/Containerfile @@ -1,4 +1,4 @@ -FROM centos:stream9 +FROM quay.io/centos/centos:stream9 # Python options = [3.9, 3.11, 3.12] ARG PYTHON_VERSION=3.11