Skip to content

Commit cfe0f93

Browse files
authored
Merge pull request #719 from LZY7977/master
add x86_64/aarch64 dotnet8
2 parents 2f7c470 + bc7338a commit cfe0f93

File tree

4 files changed

+594
-0
lines changed

4 files changed

+594
-0
lines changed

al-lambda/aarch64/dotnet8/Dockerfile

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
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/dotnet:8-arm64 AS core
13+
14+
# Install SSH, and other utilities
15+
RUN set -ex \
16+
&& dnf install -y 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+
&& dnf install -y make gcc gettext \
27+
&& dnf install -y \
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.44.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.27.1/2023-04-19/bin/linux/arm64/aws-iam-authenticator \
83+
&& curl -sS -o /usr/local/bin/kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.27.1/2023-04-19/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 dotnet_runtime
90+
91+
ENV DOTNET_SDK_VERSION "8.0.204"
92+
ENV DOTNET_SDK_DOWNLOAD_URL "https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-sdk-$DOTNET_SDK_VERSION-linux-arm64.tar.gz"
93+
ENV DOTNET_SDK_DOWNLOAD_SHA512 "7000b559efe502e9a799e9fccb6bccc2e39eb21331d6cb2be54f389e357436b84f5ccbcc73245df647749ee32d27f7fb8b7737d449312f0db7dd3409f8e12443"
94+
ENV DOTNET_DIR "/var/lang/bin"
95+
96+
RUN set -ex \
97+
&& curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \
98+
&& echo "$DOTNET_SDK_DOWNLOAD_SHA512 dotnet.tar.gz" | sha512sum -c - \
99+
&& tar -zxf dotnet.tar.gz -C $DOTNET_DIR \
100+
&& rm dotnet.tar.gz
101+
102+
# Add .NET Core Global Tools install folder to PATH
103+
ENV DOTNET_CLI_HOME=$LAMBDA_USER_HOME \
104+
PATH="$LAMBDA_USER_HOME/.dotnet/tools:$PATH"
105+
106+
# Trigger the population of the local package cache
107+
ENV NUGET_XMLDOC_MODE skip
108+
ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT true
109+
RUN set -ex \
110+
&& mkdir warmup \
111+
&& cd warmup \
112+
&& dotnet new \
113+
&& cd .. \
114+
&& rm -rf warmup \
115+
&& rm -rf /tmp/NuGetScratch
116+
117+
# Install Powershell Core
118+
# See instructions at https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-linux
119+
ENV POWERSHELL_VERSION 7.4.2
120+
ENV POWERSHELL_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v$POWERSHELL_VERSION/powershell-$POWERSHELL_VERSION-linux-arm64.tar.gz
121+
ENV POWERSHELL_DOWNLOAD_SHA 006021694A9E0CE962457D23189E3CB88AE030863B221907F8FB891DF9497AEB
122+
123+
RUN set -ex \
124+
&& curl -SL $POWERSHELL_DOWNLOAD_URL --output powershell.tar.gz \
125+
&& echo "$POWERSHELL_DOWNLOAD_SHA powershell.tar.gz" | sha256sum -c - \
126+
&& mkdir -p /opt/microsoft/powershell/$POWERSHELL_VERSION \
127+
&& tar zxf powershell.tar.gz -C /opt/microsoft/powershell/$POWERSHELL_VERSION \
128+
&& rm powershell.tar.gz \
129+
&& ln -s /opt/microsoft/powershell/$POWERSHELL_VERSION/pwsh /usr/bin/pwsh \
130+
&& pwsh --version
131+
#=======================End of layer: dotnet_runtime =================
132+
133+
FROM dotnet_runtime AS al_v1
134+
135+
COPY legal/bill_of_material.txt /usr/share/doc/bill_of_material.txt
136+
137+
# Cleanup
138+
RUN rm -fr /tmp/*
139+
#=======================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+
dotnet :https://github.com/dotnet/core/blob/master/LICENSE.TXT
157+
----------------
158+

0 commit comments

Comments
 (0)