diff --git a/LambdaRuntimeDockerfiles/Images/net5/amd64/Dockerfile b/LambdaRuntimeDockerfiles/Images/net5/amd64/Dockerfile deleted file mode 100644 index f36bc374e..000000000 --- a/LambdaRuntimeDockerfiles/Images/net5/amd64/Dockerfile +++ /dev/null @@ -1,72 +0,0 @@ -# Based on Docker image from: https://github.com/dotnet/dotnet-docker/ - -ARG ASPNET_VERSION=5.0.17 -ARG ASPNET_SHA512=d8e87804e9e86273c6512785bd5a6f0e834ff3f4bbebc11c4fcdf16ab4fdfabd0d981a756955267c1aa9bbeec596de3728ce9b2e6415d2d80daef0d999a5df6d - -ARG LAMBDA_RUNTIME_NAME=dotnet5 -ARG AMAZON_LINUX=public.ecr.aws/lambda/provided:al2 - -FROM $AMAZON_LINUX AS base - -FROM base AS builder-net5 -ARG ASPNET_VERSION -ARG ASPNET_SHA512 - -WORKDIR /dotnet - -# Install tar and gzip for unarchiving downloaded tar.gz -RUN yum install tar gzip --assumeyes - -# Install the ASP.NET Core shared framework -RUN curl -SL --output aspnetcore.tar.gz https://dotnetcli.azureedge.net/dotnet/aspnetcore/Runtime/$ASPNET_VERSION/aspnetcore-runtime-$ASPNET_VERSION-linux-x64.tar.gz \ - && aspnetcore_sha512=$ASPNET_SHA512 \ - && echo "$aspnetcore_sha512 aspnetcore.tar.gz" | sha512sum -c - \ - && tar -ozxf aspnetcore.tar.gz -C /dotnet \ - && rm aspnetcore.tar.gz - - -FROM mcr.microsoft.com/dotnet/sdk:5.0-buster-slim AS builder -WORKDIR /src -COPY ["Libraries/src/Amazon.Lambda.RuntimeSupport", "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/"] -COPY ["Libraries/src/Amazon.Lambda.Core", "Repo/Libraries/src/Amazon.Lambda.Core/"] -COPY ["buildtools/", "Repo/buildtools/"] -RUN dotnet restore "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport/Amazon.Lambda.RuntimeSupport.csproj" /p:TargetFrameworks=net5.0 -WORKDIR "Repo/Libraries/src/Amazon.Lambda.RuntimeSupport" -RUN dotnet build "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net5.0 --runtime linux-x64 -c Release -o /app/build - - -FROM builder AS publish -RUN dotnet publish "Amazon.Lambda.RuntimeSupport.csproj" /p:ExecutableOutputType=true /p:GenerateDocumentationFile=false /p:TargetFrameworks=net5.0 -f net5.0 --runtime linux-x64 --self-contained false -p:PublishReadyToRun=true -c Release -o /app/publish -RUN apt-get update && apt-get install -y dos2unix -RUN dos2unix /app/publish/bootstrap.sh && \ - mv /app/publish/bootstrap.sh /app/publish/bootstrap && \ - chmod +x /app/publish/bootstrap - -# Generate runtime-release file -ARG LAMBDA_RUNTIME_NAME -RUN export BUILD_TIMESTAMP=$(printf '%x' $(date +%s)) && \ - export LOGGING_PROTOCOL="LOGGING=amzn-stdout-tlv" && \ - export LAMBDA_RUNTIME_NAME="LAMBDA_RUNTIME_NAME=${LAMBDA_RUNTIME_NAME}" && \ - echo "NAME=dotnet\nVERSION=${ASPNET_VERSION}-${BUILD_TIMESTAMP}\n${LOGGING_PROTOCOL}\n${LAMBDA_RUNTIME_NAME}\n" > /app/publish/runtime-release - - -FROM base - -ARG ASPNET_VERSION - -ENV \ - # Export .NET version as environment variable - DOTNET_VERSION=$ASPNET_VERSION \ - # Enable detection of running in a container - DOTNET_RUNNING_IN_CONTAINER=true \ - # Lambda is opinionated about installing tooling under /var - DOTNET_ROOT=/var/lang/bin \ - # Don't display welcome message on first run - DOTNET_NOLOGO=true \ - # Disable Microsoft's telemetry collection - DOTNET_CLI_TELEMETRY_OPTOUT=true - -COPY --from=builder-net5 /dotnet ${DOTNET_ROOT} -COPY --from=publish /app/publish ${LAMBDA_RUNTIME_DIR} - -# Entrypoint is inherited from public.ecr.aws/lambda/provided diff --git a/LambdaRuntimeDockerfiles/Infrastructure/src/Infrastructure/Configuration.cs b/LambdaRuntimeDockerfiles/Infrastructure/src/Infrastructure/Configuration.cs index a9ea09cf0..11d23036f 100644 --- a/LambdaRuntimeDockerfiles/Infrastructure/src/Infrastructure/Configuration.cs +++ b/LambdaRuntimeDockerfiles/Infrastructure/src/Infrastructure/Configuration.cs @@ -34,7 +34,7 @@ internal class Configuration // The default behavior is to specify a channel and that installs the latest version in that channel // By specifying a specific .NET SDK version, you override the default channel behavior public readonly Dictionary DotnetSdkVersions = new Dictionary { }; - public readonly Dictionary DockerBuildImages = new Dictionary { {"net6", "6.0-bullseye-slim"}, {"net7", "7.0-bullseye-slim"}, {"net8", "8.0-preview-bookworm-slim"} }; + public readonly Dictionary DockerBuildImages = new Dictionary { {"net6", "6.0-bullseye-slim"}, {"net7", "7.0-bullseye-slim"}, {"net8", "8.0-bookworm-slim"} }; public readonly Dictionary BaseImageAMD64Tags = new Dictionary { { "net6", "contributed-base-image-x86_64" }, { "net7", "contributed-base-image-x86_64" }, { "net8", "contributed-base-image-x86_64" } }; public readonly Dictionary BaseImageARM64Tags = new Dictionary { { "net6", "contributed-base-image-arm64" }, { "net7", "contributed-base-image-arm64" }, { "net8", "contributed-base-image-arm64" } }; public readonly string[] Frameworks = Environment.GetEnvironmentVariable("AWS_LAMBDA_DOTNET_FRAMEWORK_VERSION")?.Split(";");