Skip to content

Commit

Permalink
test: Fix Terraform Docker container
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
valerena committed Feb 7, 2025
1 parent 359905b commit f1021f6
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -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 \
Expand All @@ -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
Expand Down

0 comments on commit f1021f6

Please sign in to comment.