Skip to content

Commit 6bd3eb5

Browse files
authored
test: Fix Terraform Docker container (#7873)
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)
1 parent 359905b commit 6bd3eb5

File tree

1 file changed

+3
-7
lines changed
  • tests/integration/testdata/buildcmd/terraform/build_image_docker

1 file changed

+3
-7
lines changed

tests/integration/testdata/buildcmd/terraform/build_image_docker/Dockerfile

+3-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
FROM public.ecr.aws/amazonlinux/amazonlinux:2
1+
FROM public.ecr.aws/amazonlinux/amazonlinux:2023
22

33
RUN yum -y update \
4-
&& yum install -y unzip tar gzip bzip2-devel ed gcc gcc-c++ gcc-gfortran \
5-
less libcurl-devel openssl openssl-devel readline-devel xz-devel \
6-
zlib-devel glibc-static libcxx libcxx-devel llvm-toolset-7 zlib-static \
4+
&& yum install -y unzip tar gzip ed less \
75
&& rm -rf /var/cache/yum
86

97
RUN yum -y install make \
@@ -15,11 +13,9 @@ RUN yum install -y yum-utils \
1513
&& terraform --version
1614

1715
# AWS Lambda Builders
18-
RUN amazon-linux-extras enable python3.9
19-
RUN yum clean metadata && yum -y install python3.9
16+
# AL2023 uses Python3.9 by default. This might fail in the future if that changes. We just need the proper version
2017
RUN curl -L get-pip.io | python3.9
2118
RUN pip3 install aws-lambda-builders
22-
RUN ln -s /usr/bin/python3.9 /usr/bin/python3
2319
RUN python3 --version
2420

2521
VOLUME /project

0 commit comments

Comments
 (0)