Skip to content

Commit

Permalink
Update all images that build SAM CLI from source to use py38
Browse files Browse the repository at this point in the history
  • Loading branch information
lucashuy committed Oct 20, 2023
1 parent 769d952 commit e94791c
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 40 deletions.
15 changes: 12 additions & 3 deletions build-image-src/Dockerfile-dotnet6
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -19,8 +18,18 @@ RUN yum groupinstall -y development && \
libgmp3-dev \
zlib1g-dev \
libmpc-devel \
python3-devel \
&& yum clean all
amazon-linux-extras

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python3.8 python3.8-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

# Install AWS CLI
ARG AWS_CLI_ARCH
Expand Down
17 changes: 13 additions & 4 deletions build-image-src/Dockerfile-dotnet7
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -19,12 +18,22 @@ RUN yum groupinstall -y development && \
libgmp3-dev \
zlib1g-dev \
libmpc-devel \
python3-devel \
amazon-linux-extras \
clang krb5-devel \
openssl-devel \
llvm \
libicu \
&& yum clean all
libicu

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python3.8 python3.8-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

# Install AWS CLI
ARG AWS_CLI_ARCH
Expand Down
15 changes: 12 additions & 3 deletions build-image-src/Dockerfile-java11
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -19,8 +18,18 @@ RUN yum groupinstall -y development && \
libgmp3-dev \
zlib1g-dev \
libmpc-devel \
python3-devel \
&& yum clean all
amazon-linux-extras

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python3.8 python3.8-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

# Install AWS CLI
ARG AWS_CLI_ARCH
Expand Down
15 changes: 12 additions & 3 deletions build-image-src/Dockerfile-java17
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -19,8 +18,18 @@ RUN yum groupinstall -y development && \
libgmp3-dev \
zlib1g-dev \
libmpc-devel \
python3-devel \
&& yum clean all
amazon-linux-extras

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python3.8 python3.8-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

# Install AWS CLI
ARG AWS_CLI_ARCH
Expand Down
17 changes: 13 additions & 4 deletions build-image-src/Dockerfile-java8_al2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -21,9 +20,19 @@ RUN yum groupinstall -y development && \
liblzma-dev \
libxslt-devel \
libmpc-devel \
python3-devel \
java-1.8.0-openjdk-devel \
&& yum clean all
amazon-linux-extras \
java-1.8.0-openjdk-devel

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python3.8 python3.8-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

# Install AWS CLI
ARG AWS_CLI_ARCH
Expand Down
12 changes: 9 additions & 3 deletions build-image-src/Dockerfile-nodejs12x
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -24,8 +23,15 @@ RUN yum groupinstall -y development && \
libgmp3-dev \
zlib1g-dev \
libmpc-devel \
python3-devel \
&& yum clean all
amazon-linux-extras

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras install -y python3.8 && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

# Install AWS CLI
ARG AWS_CLI_ARCH
Expand Down
17 changes: 13 additions & 4 deletions build-image-src/Dockerfile-nodejs14x
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -24,16 +23,26 @@ RUN yum groupinstall -y development && \
libgmp3-dev \
zlib1g-dev \
libmpc-devel \
python3-devel \
&& yum clean all
amazon-linux-extras

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python38 python38-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

# Install AWS CLI
ARG AWS_CLI_ARCH
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-$AWS_CLI_ARCH.zip" -o "awscliv2.zip" && unzip awscliv2.zip && ./aws/install && rm awscliv2.zip && rm -rf ./aws

# Install SAM CLI in a dedicated Python virtualenv
ARG SAM_CLI_VERSION
RUN curl -L "https://github.com/awslabs/aws-sam-cli/archive/v$SAM_CLI_VERSION.zip" -o "samcli.zip" && \
RUN curl -L "https://github.com/lucashuy/aws-sam-cli/archive/$SAM_CLI_VERSION.zip" -o "samcli.zip" && \
unzip samcli.zip && python3 -m venv /usr/local/opt/sam-cli && \
/usr/local/opt/sam-cli/bin/pip3 --no-cache-dir install -r ./aws-sam-cli-$SAM_CLI_VERSION/requirements/base.txt && \
/usr/local/opt/sam-cli/bin/pip3 --no-cache-dir install ./aws-sam-cli-$SAM_CLI_VERSION && \
Expand Down
15 changes: 12 additions & 3 deletions build-image-src/Dockerfile-nodejs16x
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -24,8 +23,18 @@ RUN yum groupinstall -y development && \
libgmp3-dev \
zlib1g-dev \
libmpc-devel \
python3-devel \
&& yum clean all
amazon-linux-extras

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python3.8 python3.8-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

# Install AWS CLI
ARG AWS_CLI_ARCH
Expand Down
16 changes: 12 additions & 4 deletions build-image-src/Dockerfile-nodejs18x
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ ENV PATH=/var/lang/bin:$PATH \
AWS_EXECUTION_ENV=AWS_Lambda_nodejs18.x \
NODE_PATH=/opt/nodejs/node18/node_modules:/opt/nodejs/node_modules:/var/runtime/node_modules

# Installing by yum at copied location
RUN yum groupinstall -y development && \
yum install -d1 -y \
yum \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -25,8 +23,18 @@ RUN yum groupinstall -y development && \
libgmp3-dev \
zlib1g-dev \
libmpc-devel \
python3-devel \
&& yum clean all
amazon-linux-extras

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python3.8 python3.8-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

# Install AWS CLI
ARG AWS_CLI_ARCH
Expand Down
15 changes: 12 additions & 3 deletions build-image-src/Dockerfile-provided_al2
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -21,8 +20,18 @@ RUN yum groupinstall -y development && \
liblzma-dev \
libxslt-devel \
libmpc-devel \
python3-devel \
&& yum clean all
amazon-linux-extras

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python3.8 python3.8-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

# Install AWS CLI
ARG AWS_CLI_ARCH
Expand Down
15 changes: 12 additions & 3 deletions build-image-src/Dockerfile-ruby27
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -19,8 +18,18 @@ RUN yum groupinstall -y development && \
libgmp3-dev \
zlib1g-dev \
libmpc-devel \
python3-devel \
&& yum clean all
amazon-linux-extras

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python3.8 python3.8-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

RUN gem update --system --no-document

Expand Down
15 changes: 12 additions & 3 deletions build-image-src/Dockerfile-ruby32
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ RUN yum groupinstall -y development && \
tar \
gzip \
unzip \
python3 \
jq \
grep \
curl \
Expand All @@ -19,8 +18,18 @@ RUN yum groupinstall -y development && \
libgmp3-dev \
zlib1g-dev \
libmpc-devel \
python3-devel \
&& yum clean all
amazon-linux-extras

# Install extras so that Python 3.8 is installable
# https://aws.amazon.com/amazon-linux-2/faqs/#Amazon_Linux_Extras
RUN amazon-linux-extras enable python3.8 && \
yum clean metadata && \
yum install -y python3.8 python3.8-devel && \
yum clean all && \
ln -s /usr/bin/python3.8 /usr/bin/python3 && \
ln -s /usr/bin/pip3.8 /usr/bin/pip3 && \
python3 --version && \
pip3 --version

RUN gem update --system --no-document

Expand Down

0 comments on commit e94791c

Please sign in to comment.