Skip to content

Generate fallback Dockerfile for Python apps without UV support #12049

Description

Currently, the dotnet/aspire tooling only generates a Dockerfile for Python apps when UV is being used. There is no automatic Dockerfile generation as a fallback when UV is not present.

This issue tracks adding support for generating a default Dockerfile for all Python apps when UV is not being used and no Dockerfile exists. The generated Dockerfile should:

  • Detect if a requirements.txt is present and run pip install for dependencies if so.
  • Use the same runtime image as the UV workflow for consistency.
  • Apply this fallback logic for all Python apps, not just certain scenarios.

Reference: The current implementation at src/Aspire.Hosting.Python/PythonAppResourceBuilderExtensions.cs only generates a Dockerfile when UV is used. This enhancement will ensure Python apps are supported even without UV and that dependencies are installed correctly via pip when requirements.txt is present.

Activity

  1. added this to the 13.0 milestone on Oct 15, 2025
  2. davidfowl commented on Oct 29, 2025

    @davidfowl
    CollaboratorAuthor

    For 13, we will provide a good error message.

  3. locked and limited conversation to collaborators on Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-integrationsIssues pertaining to Aspire Integrations packagespython

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions