11# Based on Docker image from: https://github.com/dotnet/dotnet-docker/
22
3- ARG ASPNET_VERSION=6 .0.36
4- ARG ASPNET_SHA512=2a6a2dde7ba3aeee9145686ee32f1901a7aa6238ae8395ea3bad51770e227069272be83959b711d238210c377b66661e3cf039965f019b58cd44c08a982404a2
3+ ARG ASPNET_VERSION=10 .0.0-preview.5.25277.114
4+ ARG ASPNET_SHA512=AC99EBEC4E7ABD660A27317D37DA56AE1FA8E9EBDBF4A88FE5F9BE58E1F4D7E8F05BEC32D5E902C0FDD1E9D9E250CDB49448266682010E4CF7F4640F9699B9F1
55
6- ARG ICU_VERSION=68.1
7- ARG ICU_MD5=6a99b541ea01f271257b121a4433c7c0
8-
9- ARG LAMBDA_RUNTIME_NAME=dotnet6
10- ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2
6+ ARG LAMBDA_RUNTIME_NAME=dotnet10
7+ ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2023
118
129FROM $AMAZON_LINUX AS base
1310
14- FROM base AS builder-libicu
15- WORKDIR /
16-
17- # Install depedencies to extract and build ICU library
18- RUN yum install -d1 -y \
19- tar \
20- gzip \
21- make \
22- gcc-c++
23-
24- # Download, validate and extract ICU library
25- # https://github.com/unicode-org/icu/releases/tag/release-68-1
26- ARG ICU_VERSION
27- ARG ICU_MD5
28- RUN curl -SL https://github.com/unicode-org/icu/releases/download/release-${ICU_VERSION//./-}/icu4c-${ICU_VERSION//./_}-src.tgz -o icu-src.tgz \
29- && echo "$ICU_MD5 icu-src.tgz" | md5sum -c - \
30- && tar -xzf icu-src.tgz \
31- && rm icu-src.tgz
32-
33- # Build ICU library
34- RUN mkdir /libicu
35- WORKDIR /icu/source/
36- RUN ./configure --prefix=/libicu \
37- && make \
38- && make install
39-
40-
41- FROM base AS builder-net6
11+ RUN dnf install libicu-67.1-7.amzn2023.0.3.aarch64 --assumeyes
12+
13+ FROM base AS builder-net10
4214ARG ASPNET_VERSION
4315ARG ASPNET_SHA512
4416
4517WORKDIR /dotnet
4618
4719# Install tar and gzip for unarchiving downloaded tar.gz
48- RUN yum install tar gzip --assumeyes
20+ RUN dnf install tar gzip --assumeyes
4921
5022# Install the ASP.NET Core shared framework
5123RUN curl -SL --output aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-arm64.tar.gz \
@@ -55,25 +27,24 @@ RUN curl -SL --output aspnetcore.tar.gz https://builds.dotnet.microsoft.com/dotn
5527 && rm aspnetcore.tar.gz
5628
5729
58- FROM mcr.microsoft.com/dotnet/sdk:6 .0-bullseye -slim AS builder
30+ FROM mcr.microsoft.com/dotnet/sdk:10 .0-preview-trixie -slim AS builder
5931WORKDIR /src
6032COPY ["Libraries/src/Amazon.Lambda.RuntimeSupport" , "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/" ]
33+ COPY ["Libraries/src/SnapshotRestore.Registry" , "Repo/Libraries/src/SnapshotRestore.Registry/" ]
6134COPY ["Libraries/src/Amazon.Lambda.Core" , "Repo/Libraries/src/Amazon.Lambda.Core/" ]
6235COPY ["buildtools/" , "Repo/buildtools/" ]
63- RUN dotnet restore "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj" /p:TargetFrameworks=net6 .0
36+ RUN dotnet restore "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj" /p:TargetFrameworks=net10 .0
6437WORKDIR "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport"
65- RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net6 .0 --runtime linux-arm64 -c Release -o /app/build
38+ RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net10 .0 --runtime linux-arm64 -c Release -o /app/build
6639
6740
6841FROM builder AS publish
69- RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net6 .0 -f net6 .0 --runtime linux-arm64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish
42+ RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net10 .0 -f net10 .0 --runtime linux-arm64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish
7043RUN apt-get update && apt-get install -y dos2unix
7144RUN dos2unix /app/publish/bootstrap.sh && \
7245 mv /app/publish/bootstrap.sh /app/publish/bootstrap && \
7346 chmod +x /app/publish/bootstrap
74-
75- # Copy native dependencies
76- COPY --from=builder-libicu /libicu /app/publish
47+ RUN touch /app/publish/empty-certificates.crt
7748
7849
7950FROM base
9364 # Disable Microsoft's telemetry collection
9465 DOTNET_CLI_TELEMETRY_OPTOUT=true
9566
96- COPY --from=builder-net6 /dotnet ${DOTNET_ROOT}
67+ COPY --from=builder-net10 /dotnet ${DOTNET_ROOT}
9768COPY --from=publish /app/publish ${LAMBDA_RUNTIME_DIR}
9869
9970# Generate runtime-release file
0 commit comments