Skip to content

Commit 1e24f33

Browse files
authored
Add new lambda images for nodejs22, python3.13, go1.24 and ruby3.4.
Add new lambda images for nodejs22, python3.13, go1.24 and ruby3.4.
2 parents 800837a + 24770cf commit 1e24f33

File tree

18 files changed

+2171
-0
lines changed

18 files changed

+2171
-0
lines changed
Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# Copyright 2020-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Amazon Software License (the "License"). You may not use this file except in compliance with the License.
4+
# A copy of the License is located at
5+
#
6+
# http://aws.amazon.com/asl/
7+
#
8+
# or in the "license" file accompanying this file.
9+
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied.
10+
# See the License for the specific language governing permissions and limitations under the License.
11+
12+
FROM public.ecr.aws/amazonlinux/amazonlinux:2023 AS core
13+
14+
# Install SSH, and other utilities
15+
RUN set -ex \
16+
&& yum install -y -q openssh-clients \
17+
&& mkdir ~/.ssh \
18+
&& mkdir -p /opt/tools \
19+
&& mkdir -p /codebuild/image/config \
20+
&& touch ~/.ssh/known_hosts \
21+
&& ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H github.com >> ~/.ssh/known_hosts \
22+
&& ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H bitbucket.org >> ~/.ssh/known_hosts \
23+
&& chmod 600 ~/.ssh/known_hosts \
24+
&& rpm --import https://download.mono-project.com/repo/xamarin.gpg \
25+
&& curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo \
26+
&& yum groupinstall -y -q "Development tools" \
27+
&& yum install -y -q \
28+
ImageMagick asciidoc bzip2-devel cvs cvsps \
29+
docbook-dtds docbook-style-xsl e2fsprogs expat-devel expect fakeroot \
30+
glib2-devel groff gzip icu iptables jq krb5-server libargon2-devel \
31+
libcurl-devel libdb-devel libedit-devel libevent-devel libffi-devel \
32+
libicu-devel libjpeg-devel libpng-devel libserf sqlite-devel \
33+
libtidy-devel libunwind libwebp-devel libxml2-devel libxslt libxslt-devel \
34+
libyaml-devel libzip-devel mariadb105-devel mercurial mlocate \
35+
ncurses-devel oniguruma-devel openssl openssl-devel perl-DBD-SQLite \
36+
perl-DBI perl-HTTP-Date perl-TimeDate perl-YAML-LibYAML \
37+
postgresql-devel procps-ng python-configobj readline-devel rsync sgml-common \
38+
subversion-perl tar tcl tk vim wget which xfsprogs xmlto xorg-x11-server-Xvfb xz-devel \
39+
amazon-ecr-credential-helper \
40+
&& rm /etc/yum.repos.d/mono-centos7-stable.repo
41+
42+
RUN /usr/sbin/useradd codebuild-user
43+
44+
ENV HOME="/tmp"
45+
ENV LAMBDA_USER_HOME="/tmp/opt"
46+
#=======================End of layer: core =================
47+
48+
FROM core AS tools
49+
50+
# Install Git
51+
RUN set -ex \
52+
&& GIT_VERSION=2.49.0 \
53+
&& GIT_TAR_FILE=git-$GIT_VERSION.tar.gz \
54+
&& GIT_SRC=https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz \
55+
&& curl -L -o $GIT_TAR_FILE $GIT_SRC \
56+
&& tar zxf $GIT_TAR_FILE \
57+
&& cd git-$GIT_VERSION \
58+
&& make -j4 prefix=/usr \
59+
&& make install prefix=/usr \
60+
&& cd .. && rm -rf git-$GIT_VERSION \
61+
&& rm -rf $GIT_TAR_FILE /tmp/*
62+
63+
# Install AWS CLI v2
64+
# https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html
65+
RUN curl https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip -o /tmp/awscliv2.zip \
66+
&& unzip -q /tmp/awscliv2.zip -d /opt \
67+
&& /opt/aws/install --update -i /usr/local/aws-cli -b /usr/local/bin \
68+
&& rm /tmp/awscliv2.zip \
69+
&& rm -rf /opt/aws \
70+
&& aws --version
71+
72+
# Install AWS SAM CLI
73+
RUN wget -nv https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-arm64.zip -O /tmp/samcli.zip \
74+
&& unzip -q /tmp/samcli.zip -d /opt \
75+
&& /opt/install --update -i /usr/local/sam-cli -b /usr/local/bin \
76+
&& rm /tmp/samcli.zip /opt/install \
77+
&& rm -rf /opt/aws-sam-cli-src \
78+
&& sam --version
79+
80+
# AWS Tools
81+
# https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_installation.html
82+
RUN curl -sS -o /usr/local/bin/aws-iam-authenticator https://s3.us-west-2.amazonaws.com/amazon-eks/1.32.0/2024-12-20/bin/linux/arm64/aws-iam-authenticator \
83+
&& curl -sS -o /usr/local/bin/kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.32.0/2024-12-20/bin/linux/arm64/kubectl \
84+
&& curl -sS -o /usr/local/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-arm64-latest \
85+
&& curl -sS -L https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_arm64.tar.gz | tar xz -C /usr/local/bin \
86+
&& chmod +x /usr/local/bin/kubectl /usr/local/bin/aws-iam-authenticator /usr/local/bin/ecs-cli /usr/local/bin/eksctl
87+
#======================= End of layer: tools =================
88+
89+
FROM tools AS go_runtime
90+
91+
ENV GOLANG_VERSION="1.24.1" \
92+
GOPATH="/go" \
93+
GOLANG_DOWNLOAD_SHA256="8df5750ffc0281017fb6070fba450f5d22b600a02081dceef47966ffaf36a3af"
94+
ENV PATH="$GOPATH/bin:$LAMBDA_USER_HOME/go/bin:/usr/local/go/bin:$PATH"
95+
96+
RUN set -ex \
97+
&& mkdir -p "$GOPATH/src" "$GOPATH/bin" \
98+
&& chmod -R 777 "$GOPATH" \
99+
&& wget "https://dl.google.com/go/go$GOLANG_VERSION.linux-arm64.tar.gz" -O /tmp/golang.tar.gz \
100+
&& echo "$GOLANG_DOWNLOAD_SHA256 /tmp/golang.tar.gz" | sha256sum -c - \
101+
&& tar -xzf /tmp/golang.tar.gz -C /usr/local \
102+
&& go env -w GO111MODULE=auto \
103+
&& rm -fr /tmp/* /var/tmp/*
104+
105+
ENV GOPATH="$GOPATH:$LAMBDA_USER_HOME/go" \
106+
GOBIN="$LAMBDA_USER_HOME/go/bin" \
107+
GOMODCACHE="$LAMBDA_USER_HOME/gomodcache"
108+
#=======================End of layer: go_runtime =================
109+
110+
FROM go_runtime AS al_v1
111+
112+
COPY legal/bill_of_material.txt /usr/share/doc/bill_of_material.txt
113+
114+
# Cleanup
115+
RUN rm -fr /tmp/*
116+
#=======================End of layer: al_lambda_v1 =================
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
The Amazon CodeBuild Product includes the following third-party software/licensing:
2+
3+
----------------
4+
GeoIP-devel : LGPLv2+ and GPLv2+ and CC-BY-SA
5+
----------------
6+
ImageMagick : ImageMagick
7+
----------------
8+
asciidoc : GPL+ and GPLv2+
9+
----------------
10+
bzip2-devel : BSD
11+
----------------
12+
bzr : GPLv2+
13+
----------------
14+
bzrtools : GPLv2+
15+
----------------
16+
cvs : BSD and GPL+ and GPLv2+ and LGPLv2+ and zlib and Public Domain
17+
----------------
18+
cvsps : GPL+
19+
----------------
20+
dbus-glib-devel : AFL and GPLv2+
21+
----------------
22+
docbook-dtds : Copyright only
23+
----------------
24+
docbook-style-xsl : DMIT
25+
----------------
26+
dpkg-dev : GPLv2 and GPLv2+ and LGPLv2+ and Public Domain and BSD
27+
----------------
28+
e2fsprogs : GPLv2
29+
----------------
30+
expat-devel : MIT
31+
----------------
32+
expect : Public Domain
33+
----------------
34+
fakeroot : GPLv3+ and LGPLv2+ and (GPL+ or Artistic)
35+
----------------
36+
glib2-devel : LGPLv2+
37+
----------------
38+
groff : GPLv3+ and GFDL and BSD and MIT
39+
----------------
40+
gtk3-devel : LGPLv2+
41+
----------------
42+
gzip : GPLv3+ and GFDL
43+
----------------
44+
icu : MIT and UCD and Public Domain
45+
----------------
46+
iptables : GPLv2
47+
----------------
48+
jq : MIT and ASL 2.0 and CC-BY and GPLv3
49+
----------------
50+
krb5-server : MIT
51+
----------------
52+
libargon2-devel : Public Domain or ASL 2.0
53+
----------------
54+
libcurl-devel : MIT
55+
----------------
56+
libdb-devel : BSD and LGPLv2 and Sleepycat
57+
----------------
58+
libedit-devel : BSD
59+
----------------
60+
libevent-devel : BSD
61+
----------------
62+
libffi-devel : MIT and Public Domain
63+
----------------
64+
libgit2 : GPLv2 with exceptions
65+
----------------
66+
libicu-devel : MIT and UCD and Public Domain
67+
----------------
68+
libpng-devel : zlib
69+
----------------
70+
libserf : ASL 2.0
71+
----------------
72+
libsqlite3x-devel : zlib
73+
----------------
74+
libtidy-devel : W3C
75+
----------------
76+
libunwind : BSD
77+
----------------
78+
libwebp-devel : BSD
79+
----------------
80+
libxml2-devel : MIT
81+
----------------
82+
libxslt : MIT
83+
----------------
84+
libxslt-devel : MIT
85+
----------------
86+
libyaml-devel : MIT
87+
----------------
88+
libzip-devel : BSD
89+
----------------
90+
mariadb-devel : GPLv2 with exceptions and LGPLv2 and BSD
91+
----------------
92+
mercurial : GPLv2+
93+
----------------
94+
mlocate : GPLv2
95+
----------------
96+
mono-devel : LGPL-2.1
97+
----------------
98+
ncurses-devel : MIT
99+
----------------
100+
oniguruma-devel : BSD
101+
----------------
102+
openssh-clients : BSD
103+
----------------
104+
openssl : OpenSSL
105+
----------------
106+
openssl-devel : OpenSSL
107+
----------------
108+
perl-DBD-SQLite : GPL+ or Artistic
109+
----------------
110+
perl-DBI : GPL+ or Artistic
111+
----------------
112+
perl-HTTP-Date : GPL+ or Artistic
113+
----------------
114+
perl-IO-Pty-Easy : GPL+ or Artistic
115+
----------------
116+
perl-TimeDate : GPL+ or Artistic
117+
----------------
118+
perl-YAML-LibYAML : GPL+ or Artistic
119+
----------------
120+
postgresql-devel : PostgreSQL
121+
----------------
122+
procps-ng : GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+
123+
----------------
124+
readline-devel : GPLv3+
125+
----------------
126+
rsync : GPLv3+
127+
----------------
128+
sbt : BSD
129+
----------------
130+
sgml-common : GPL+
131+
----------------
132+
subversion-perl : ASL 2.0
133+
----------------
134+
tar : GPLv3+
135+
----------------
136+
tcl : TCL
137+
----------------
138+
tk : TCL
139+
----------------
140+
wget : GPLv3+
141+
----------------
142+
which : GPLv3
143+
----------------
144+
xfsprogs : GPL+ and LGPLv2+
145+
----------------
146+
xmlto : GPLv2+
147+
----------------
148+
xorg-x11-server-Xvfb : MIT and GPLv2
149+
----------------
150+
xz-devel : LGPLv2+
151+
----------------
152+
gitversion :https://github.com/GitTools/GitVersion/blob/master/LICENSE
153+
----------------
154+
docker :https://www.docker.com/legal/components-licenses
155+
----------------
156+
golang :https://golang.org/LICENSE
157+
----------------
158+
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Copyright 2020-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
#
3+
# Licensed under the Amazon Software License (the "License"). You may not use this file except in compliance with the License.
4+
# A copy of the License is located at
5+
#
6+
# http://aws.amazon.com/asl/
7+
#
8+
# or in the "license" file accompanying this file.
9+
# This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, express or implied.
10+
# See the License for the specific language governing permissions and limitations under the License.
11+
12+
FROM public.ecr.aws/lambda/nodejs:22-arm64 AS core
13+
14+
# Set LD_LIBRARY_PATH to avoid Openssl issues
15+
ENV LD_LIBRARY_PATH=""
16+
17+
# Install SSH, and other utilities
18+
RUN set -ex \
19+
&& dnf install -y openssh-clients \
20+
&& mkdir ~/.ssh \
21+
&& mkdir -p /opt/tools \
22+
&& mkdir -p /codebuild/image/config \
23+
&& touch ~/.ssh/known_hosts \
24+
&& ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H github.com >> ~/.ssh/known_hosts \
25+
&& ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H bitbucket.org >> ~/.ssh/known_hosts \
26+
&& chmod 600 ~/.ssh/known_hosts \
27+
&& rpm --import https://download.mono-project.com/repo/xamarin.gpg \
28+
&& dnf install -y \
29+
ImageMagick asciidoc bzip2-devel cvs cvsps \
30+
docbook-dtds docbook-style-xsl e2fsprogs expat-devel expect fakeroot \
31+
glib2-devel groff gzip icu iptables jq krb5-server libargon2-devel \
32+
libcurl-devel libdb-devel libedit-devel libevent-devel libffi-devel \
33+
libicu-devel libjpeg-devel libpng-devel libserf sqlite-devel \
34+
libtidy-devel libunwind libwebp-devel libxml2-devel libxslt libxslt-devel \
35+
libyaml-devel libzip-devel mariadb105-devel mercurial mlocate \
36+
ncurses-devel oniguruma-devel openssl openssl-devel perl-DBD-SQLite \
37+
perl-DBI perl-HTTP-Date perl-TimeDate perl-YAML-LibYAML \
38+
postgresql-devel procps-ng python-configobj readline-devel rsync sgml-common \
39+
subversion-perl tar tcl tk vim wget which xfsprogs xmlto xorg-x11-server-Xvfb xz-devel \
40+
amazon-ecr-credential-helper make gcc gettext
41+
42+
RUN /usr/sbin/useradd codebuild-user
43+
44+
ENV HOME="/tmp"
45+
ENV LAMBDA_USER_HOME="/tmp/opt"
46+
#=======================End of layer: core =================
47+
48+
FROM core AS tools
49+
50+
# Install Git
51+
RUN set -ex \
52+
&& GIT_VERSION=2.49.0 \
53+
&& GIT_TAR_FILE=git-$GIT_VERSION.tar.gz \
54+
&& GIT_SRC=https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz \
55+
&& curl -L -o $GIT_TAR_FILE $GIT_SRC \
56+
&& tar zxf $GIT_TAR_FILE \
57+
&& cd git-$GIT_VERSION \
58+
&& make -j4 prefix=/usr \
59+
&& make install prefix=/usr \
60+
&& cd .. && rm -rf git-$GIT_VERSION \
61+
&& rm -rf $GIT_TAR_FILE /tmp/*
62+
63+
# Install AWS CLI v2
64+
# https://docs.aws.amazon.com/cli/latest/userguide/install-cliv2-linux.html
65+
RUN curl https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip -o /tmp/awscliv2.zip \
66+
&& unzip -q /tmp/awscliv2.zip -d /opt \
67+
&& /opt/aws/install --update -i /usr/local/aws-cli -b /usr/local/bin \
68+
&& rm /tmp/awscliv2.zip \
69+
&& rm -rf /opt/aws \
70+
&& aws --version
71+
72+
# Install AWS SAM CLI
73+
RUN wget -nv https://github.com/aws/aws-sam-cli/releases/latest/download/aws-sam-cli-linux-arm64.zip -O /tmp/samcli.zip \
74+
&& unzip -q /tmp/samcli.zip -d /opt \
75+
&& /opt/install --update -i /usr/local/sam-cli -b /usr/local/bin \
76+
&& rm /tmp/samcli.zip /opt/install \
77+
&& rm -rf /opt/aws-sam-cli-src \
78+
&& sam --version
79+
80+
# AWS Tools
81+
# https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_installation.html
82+
RUN curl -sS -o /usr/local/bin/aws-iam-authenticator https://s3.us-west-2.amazonaws.com/amazon-eks/1.32.0/2024-12-20/bin/linux/arm64/aws-iam-authenticator \
83+
&& curl -sS -o /usr/local/bin/kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.32.0/2024-12-20/bin/linux/arm64/kubectl \
84+
&& curl -sS -o /usr/local/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-arm64-latest \
85+
&& curl -sS -L https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_arm64.tar.gz | tar xz -C /usr/local/bin \
86+
&& chmod +x /usr/local/bin/kubectl /usr/local/bin/aws-iam-authenticator /usr/local/bin/ecs-cli /usr/local/bin/eksctl
87+
#======================= End of layer: tools =================
88+
89+
FROM tools AS node_runtime
90+
91+
RUN dnf install -y libuv \
92+
&& npm install -g yarn \
93+
&& yarn --version \
94+
&& npm config --global set prefix $LAMBDA_USER_HOME/npm \
95+
&& rm -fr /tmp/*
96+
97+
ENV PATH="$LAMBDA_USER_HOME/npm/bin:$PATH"
98+
#=======================End of layer: node_runtime =================
99+
100+
FROM node_runtime AS al_v1
101+
102+
COPY legal/bill_of_material.txt /usr/share/doc/bill_of_material.txt
103+
104+
# Cleanup
105+
RUN rm -fr /tmp/*
106+
#=======================End of layer: al_lambda_v1 =================

0 commit comments

Comments
 (0)