From f1021f62a97bf8a1ca0711351b272fd0456ddd6c Mon Sep 17 00:00:00 2001 From: Renato Valenzuela Date: Fri, 7 Feb 2025 01:22:02 +0000 Subject: [PATCH] test: Fix Terraform Docker container Terraform Docker container was trying to use python3.9 on AL2, which doesn't exist. Migrate to AL2023, which already has python3.9 installed (so we don't even need to install it) --- .../buildcmd/terraform/build_image_docker/Dockerfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/integration/testdata/buildcmd/terraform/build_image_docker/Dockerfile b/tests/integration/testdata/buildcmd/terraform/build_image_docker/Dockerfile index 1d78793731..eb1c475ceb 100644 --- a/tests/integration/testdata/buildcmd/terraform/build_image_docker/Dockerfile +++ b/tests/integration/testdata/buildcmd/terraform/build_image_docker/Dockerfile @@ -1,9 +1,7 @@ -FROM public.ecr.aws/amazonlinux/amazonlinux:2 +FROM public.ecr.aws/amazonlinux/amazonlinux:2023 RUN yum -y update \ - && yum install -y unzip tar gzip bzip2-devel ed gcc gcc-c++ gcc-gfortran \ - less libcurl-devel openssl openssl-devel readline-devel xz-devel \ - zlib-devel glibc-static libcxx libcxx-devel llvm-toolset-7 zlib-static \ + && yum install -y unzip tar gzip ed less \ && rm -rf /var/cache/yum RUN yum -y install make \ @@ -15,11 +13,9 @@ RUN yum install -y yum-utils \ && terraform --version # AWS Lambda Builders -RUN amazon-linux-extras enable python3.9 -RUN yum clean metadata && yum -y install python3.9 +# AL2023 uses Python3.9 by default. This might fail in the future if that changes. We just need the proper version RUN curl -L get-pip.io | python3.9 RUN pip3 install aws-lambda-builders -RUN ln -s /usr/bin/python3.9 /usr/bin/python3 RUN python3 --version VOLUME /project