Skip to content

Update Docker images to Debian trixie (Python 3.13-slim-trixie) - #2421

Merged
Adam Fourney (afourney) merged 3 commits into
microsoft:mainfrom
erwinkersten:fix/docker-bullseye-eol
Sep 9, 2026
Merged

Adam Fourney (afourney) merged 3 commits into
microsoft:mainfrom
erwinkersten:fix/docker-bullseye-eol

Conversation

@erwinkersten

Copy link
Copy Markdown
Contributor

Moves both Dockerfiles from python:3.13-slim-bullseye to python:3.13-slim-trixie, plus two small fixes surfaced by the upgrade.

Fixes: #2420

Changes

  • Dockerfile, packages/markitdown-mcp/Dockerfile: base image to python:3.13-slim-trixie.
  • exiftool package name: exiftool does not exist in trixie (apt-cache policy exiftoolCandidate: (none)), so the build fails at apt-get install. Switched to libimage-exiftool-perl, which provides /usr/bin/exiftool and matches the existing EXIFTOOL_PATH.
  • ORT_DISABLE_TELEMETRY=1: onnxruntime (via magika) logs Failed to persist telemetry device ID on every run, because the images run as nobody, whose $HOME is /nonexistent. Setting this removes the noise — relevant for the MCP server, where stray stderr output clutters client logs.
  • packages/markitdown-mcp/src/markitdown_mcp/__main__.py: call Settings.model_rebuild() before FastMCP("markitdown") is constructed, to silence IncompleteFieldDefinitionWarning: Field 'lifespan' has an incomplete definition from newer pydantic-settings. This resolves the forward reference rather than suppressing the warning: Settings.model_fields['lifespan'].annotation goes from an unresolved string to a real Callable[[FastMCP], AbstractAsyncContextManager[LifespanResultT]] | None. The call must precede first instantiation, since that is when the warning fires.

Verification

Both images build and run:

  • exiftool 13.25 and ffmpeg 7.1.5-0+deb13u1 resolve at the paths EXIFTOOL_PATH / FFMPEG_PATH point to.
  • markitdown CLI converts HTML → Markdown correctly.
  • markitdown-mcp completes a full stdio JSON-RPC handshake, tools/list, and a real tools/call conversion. stderr now contains only the normal MCP request log line, no warnings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused compatibility updates are internally consistent and address the reported build and runtime issues.

Pull request overview

Updates Docker images to supported Debian Trixie and resolves upgrade-related runtime warnings.

Changes:

  • Upgrades both images to python:3.13-slim-trixie.
  • Replaces the unavailable exiftool package and disables ONNX telemetry.
  • Rebuilds MCP settings before server initialization.
File summaries
File Description
Dockerfile Updates the primary image and runtime dependencies.
packages/markitdown-mcp/Dockerfile Updates and streamlines the MCP image.
packages/markitdown-mcp/src/markitdown_mcp/__main__.py Resolves the MCP settings forward reference.
Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@afourney
Adam Fourney (afourney) merged commit 83c7730 into microsoft:main Sep 9, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker build fails: python:3.13-slim-bullseye base image is EOL

3 participants