# Shared .NET 10 NativeAOT build environment for MoShiro's Linux node images. # The SDK image includes the Linux NativeAOT compiler prerequisites. Warm the # repository-pinned AotAnywhere MSBuild SDK into this image so builds do not # depend on a writable host-mounted NuGet cache. FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:10.0-noble-aot ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 \ DOTNET_NOLOGO=1 \ NUGET_PACKAGES=/root/.nuget/packages WORKDIR /opt/aotanywhere COPY global.json ./global.json COPY Directory.Packages.props ./Directory.Packages.props COPY backend/Directory.Build.props ./backend/Directory.Build.props COPY backend/BannedSymbols.txt ./backend/BannedSymbols.txt WORKDIR /opt/aotanywhere/backend RUN printf '%s\n' \ '' \ ' ' \ ' ' \ ' net10.0' \ ' true' \ ' true' \ ' ' \ '' > Warmup.csproj \ && dotnet restore Warmup.csproj -p:PublishAot=true -p:UseAotAnywhere=true -r linux-musl-x64 \ && dotnet restore Warmup.csproj -p:PublishAot=true -p:UseAotAnywhere=true -r linux-musl-arm64 \ && rm Warmup.csproj \ && rm -rf artifacts WORKDIR /src/backend