mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Align dotnet hosted agent samples with the Python side (PR #5281) by reorganizing the directory structure: - Remove HostedAgentsV1 entirely (old API pattern) - Split HostedAgentsV2 into invocations/ and responses/ based on protocol - Move Using-Samples accordingly (SimpleAgent to responses, SimpleInvocationsAgent to invocations) - Update slnx with new project paths and add previously missing invocations projects - Update README cd paths from HostedAgentsV2 to invocations or responses - Rename .env.local to .env.example to match Python naming convention - Fix format violations in newly included invocations projects
20 lines
1018 B
Docker
20 lines
1018 B
Docker
# Dockerfile for contributors building from the agent-framework repository source.
|
|
#
|
|
# This project uses ProjectReference to the local Microsoft.Agents.AI.Foundry source,
|
|
# which means a standard multi-stage Docker build cannot resolve dependencies outside
|
|
# this folder. Instead, pre-publish the app targeting the container runtime and copy
|
|
# the output into the container:
|
|
#
|
|
# dotnet publish -c Debug -f net10.0 -r linux-musl-x64 --self-contained false -o out
|
|
# docker build -f Dockerfile.contributor -t hosted-local-tools .
|
|
# docker run --rm -p 8088:8088 -e AGENT_NAME=hosted-local-tools -e AZURE_BEARER_TOKEN=$AZURE_BEARER_TOKEN --env-file .env hosted-local-tools
|
|
#
|
|
# For end-users consuming the NuGet package (not ProjectReference), use the standard
|
|
# Dockerfile which performs a full dotnet restore + publish inside the container.
|
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final
|
|
WORKDIR /app
|
|
COPY out/ .
|
|
EXPOSE 8088
|
|
ENV ASPNETCORE_URLS=http://+:8088
|
|
ENTRYPOINT ["dotnet", "HostedLocalTools.dll"]
|