Skip to content

Comments

Docker: Use runtime-deps base image#1782

Open
anuchandy wants to merge 3 commits intomicrosoft:mainfrom
anuchandy:use-runtime-deps-base-image
Open

Docker: Use runtime-deps base image#1782
anuchandy wants to merge 3 commits intomicrosoft:mainfrom
anuchandy:use-runtime-deps-base-image

Conversation

@anuchandy
Copy link
Member

What does this PR do?

In this merged pr, we enabled self-contained trimmed server binary for the Docker image. The beta.21 release shows the following size savings:

azmcp version arm64 amd64
beta.20 (untrimmed) 1.21GB 1.31GB
beta.21 (trimmed) 648MB 784MB
Savings 562MB (46%) 526MB (40%)

This is a follow-up PR that changes the Docker base image from aspnet:10.0-alpine to runtime-deps:10.0-alpine. Since a self-contained trimmed binary doesn't require the full ASP.NET runtime, this change reduces the image size by an additional ~20-25%

azmcp version arm64 amd64
beta.21 (aspnet base) 648MB 784MB
beta.22 (runtime-deps base, projected for upcoming release) ~482MB ~624MB
Savings ~166MB (26%) ~160MB (20%)

Combining these two PRs, the overall size savings is in the range of 50-60%.

azmcp version arm64 amd64
beta.20 (untrimmed, aspnet base) 1.21GB 1.31GB
beta.22 (trimmed, runtime-deps base, projected for upcoming release) ~482MB ~624MB
Overall Savings ~728MB (60%) ~686MB (52%)

[Any additional context, screenshots, or information that helps reviewers]

GitHub issue number?

[Link to the GitHub issue this PR addresses]

Pre-merge Checklist

  • Required for All PRs
    • Read contribution guidelines
    • PR title clearly describes the change
    • Commit history is clean with descriptive messages (cleanup guide)
    • Added comprehensive tests for new/modified functionality
    • Updated servers/Azure.Mcp.Server/CHANGELOG.md and/or servers/Fabric.Mcp.Server/CHANGELOG.md for product changes (features, bug fixes, UI/UX, updated dependencies)
  • For MCP tool changes:
    • One tool per PR: This PR adds or modifies only one MCP tool for faster review cycles
    • Updated servers/Azure.Mcp.Server/README.md and/or servers/Fabric.Mcp.Server/README.md documentation
    • Validate README.md changes using script at eng/scripts/Process-PackageReadMe.ps1. See Package README
    • Updated command list in /servers/Azure.Mcp.Server/docs/azmcp-commands.md and/or /docs/fabric-commands.md
    • Run .\eng\scripts\Update-AzCommandsMetadata.ps1 to update tool metadata in azmcp-commands.md (required for CI)
    • For new or modified tool descriptions, ran ToolDescriptionEvaluator and obtained a score of 0.4 or more and a top 3 ranking for all related test prompts
    • For tools with new names, including new tools or renamed tools, update consolidated-tools.json
    • For new tools associated with Azure services or publicly available tools/APIs/products, add URL to documentation in the PR description
  • Extra steps for Azure MCP Server tool changes:
    • Updated test prompts in /servers/Azure.Mcp.Server/docs/e2eTestPrompts.md
    • 👉 For Community (non-Microsoft team member) PRs:
      • Security review: Reviewed code for security vulnerabilities, malicious code, or suspicious activities before running tests (crypto mining, spam, data exfiltration, etc.)
      • Manual tests run: added comment /azp run mcp - pullrequest - live to run Live Test Pipeline

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR optimizes the Docker image size by switching the base image from aspnet:10.0-alpine to runtime-deps:10.0-alpine. Following PR #1760 which enabled self-contained trimmed binaries for Docker, this change removes the unnecessary ASP.NET runtime from the base image since all required dependencies are now included in the self-contained binary itself.

Changes:

  • Switch Docker base image from aspnet:10.0-alpine to runtime-deps:10.0-alpine, achieving an additional ~20-25% image size reduction
  • Update Azure MCP Server CHANGELOG.md to document the image size improvements from the trimmed binary change
  • Add changelog entry describing the Docker base image optimization

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
Dockerfile Changed base image from aspnet to runtime-deps, appropriate for self-contained binaries
servers/Azure.Mcp.Server/CHANGELOG.md Updated description for PR #1760 to include image size metrics (incorrect section - should be in Unreleased)
servers/Azure.Mcp.Server/changelog-entries/1771625444448.yaml Added changelog entry for the Docker base image change

@github-project-automation github-project-automation bot moved this from Untriaged to In Progress in Azure MCP Server Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants