microsoft / microsoft/aspire.dev

[What's New Analysis] Document container-based builds / WithDockerfileBuilder

Open
#349 0 comments 0 reactions 1 assignee View on GitHub

@IEvangelist is already working on this.

Since Jun 2, 2026.

external feedback
Dominant language
MDX
Stars
193
Forks
87
Avg merge
1d 22h
Merged PRs (30d)
73

Description

Summary

Aspire 13.0 introduced automatic Dockerfile generation and WithDockerfileBuilder APIs for Python, JavaScript, and custom scenarios. These are experimental but not documented.

What's Missing

From what's-new-in-aspire-13:

Automatic Dockerfile Generation

Python and JavaScript apps automatically generate production-ready Dockerfiles when publishing:

  • Multi-stage builds
  • Package manager detection (pip/uv, npm/yarn/pnpm)
  • Python version detection from .python-version, pyproject.toml
  • Node.js version detection from .nvmrc, .node-version, package.json
WithDockerfileBuilder (Experimental)
// Experimental API
#pragma warning disable ASPIREXXX
var app = builder.AddContainer("myapp", "myimage")
    .WithDockerfileBuilder(...);
#pragma warning restore ASPIREXXX

Suggested Content

  1. Auto Dockerfile generation - How it works for Python/JS
  2. Version detection - Where versions are read from
  3. Customizing builds - WithDockerfileBuilder experimental API
  4. Multi-stage builds - How they're structured
  5. Examples - Python with uv, Node with pnpm

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.