Files
SergeyMenshykh 5c70e143a0 .NET: Fix samples for hosted agents (#2550)
* update .net sdk and runtime images and update nuget packages to the latests versions

* align version of roslyn analyzers

* unlock roslyn analyzer packages
2025-12-02 11:12:46 +00:00

21 lines
562 B
Docker

# Build the application
FROM mcr.microsoft.com/dotnet/sdk:10.0-alpine AS build
WORKDIR /src
# Copy files from the current directory on the host to the working directory in the container
COPY . .
RUN dotnet restore
RUN dotnet build -c Release --no-restore
RUN dotnet publish -c Release --no-build -o /app -f net10.0
# Run the application
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final
WORKDIR /app
# Copy everything needed to run the app from the "build" stage.
COPY --from=build /app .
EXPOSE 8088
ENTRYPOINT ["dotnet", "AgentWithHostedMCP.dll"]