Skip to content

Commit 176f2eb

Browse files
committed
test: go back to AL2 image in tf integ tests
We tried to move to an AL2023 image for an Image function on Terraform tests, when updating to Python 3.9, but the AppVeyor environment had some problems. So let's go back to the AL2 base image and install Python 3.9 in a different way.
1 parent d5ec49e commit 176f2eb

File tree

1 file changed

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

1 file changed

+15
-7
lines changed

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

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

33
RUN yum -y update \
4-
&& yum install -y unzip tar gzip ed less \
4+
&& yum install -y unzip tar gzip ed less wget \
55
&& rm -rf /var/cache/yum
66

7-
RUN yum -y install make \
8-
&& yum -y install zip
7+
RUN yum -y groupinstall "Development Tools"
8+
9+
RUN yum -y install openssl-devel bzip2-devel libffi-devel
910

1011
RUN yum install -y yum-utils \
1112
&& yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo \
1213
&& yum -y install terraform \
1314
&& terraform --version
1415

1516
# AWS Lambda Builders
16-
# AL2023 uses Python3.9 by default. This might fail in the future if that changes. We just need the proper version
17-
RUN curl -L get-pip.io | python3.9
18-
RUN pip3 install aws-lambda-builders
17+
RUN cd /tmp \
18+
&& wget https://www.python.org/ftp/python/3.9.17/Python-3.9.17.tgz \
19+
&& tar xvf Python-3.9.17.tgz \
20+
&& cd Python-3.9.17 \
21+
&& ./configure --enable-optimizations \
22+
&& make install
23+
24+
RUN python3 -m ensurepip
25+
RUN python3 -m pip install --upgrade pip
26+
RUN python3 -m pip install aws-lambda-builders
1927
RUN python3 --version
2028

2129
VOLUME /project

0 commit comments

Comments
 (0)