# Resolve a native Agent RID once in the shared Buildah store. Later build jobs # start from this image and reuse both project.assets.json and the NuGet cache. ARG NATIVEAOT_BUILDER_IMAGE=localhost/moshiro-dotnet10-nativeaot-aotanywhere:ci FROM --platform=linux/amd64 ${NATIVEAOT_BUILDER_IMAGE} AS toolchain FROM toolchain AS restore WORKDIR /src/backend COPY restore/backend/ ./ ARG NODE_RID=linux-musl-arm64 ARG STATIC_MSQUIC=true ENV NUGET_PACKAGES=/root/.nuget/packages RUN dotnet restore Agent.Native.proj -r "$NODE_RID" -p:PublishAot=true -p:UseAotAnywhere=true -p:SelfContained=true \ -p:StaticMsQuic="$STATIC_MSQUIC" -p:StaticExecutable="$STATIC_MSQUIC" \ -p:RuntimeFrameworkVersion=10.0.12 -p:InvariantGlobalization=true --artifacts-path /artifacts