microsoft / microsoft/aspire.dev
[What's New Analysis] Create persistent containers documentation
Open
@DamianEdwards is already working on this.
Since Feb 9, 2026.
external feedback
- Dominant language
- MDX
- Stars
- 193
- Forks
- 87
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 73
Description
Summary
Persistent containers (WithLifetime(ContainerLifetime.Persistent)) were enhanced in Aspire 9.4 but have no standalone documentation.
What's Missing
Core API
var database = builder.AddPostgres("postgres")
.WithLifetime(ContainerLifetime.Persistent) // Survives app restarts
.WithExplicitStart(); // Manual start control
Key Behaviors (from what's-new 9.4)
- Improved lifecycle coordination between WithExplicitStart and Persistent
- Automatic persistent networking - separate Docker network for persistent containers
- Container delay start - more reliable startup sequencing
- Network isolation - persistent vs session-scoped containers use separate networks
Suggested Content
- When to use persistent containers - stateful services, databases, long-running processes
- Lifecycle behavior - what happens on app restart
- Networking - automatic network creation, isolation from session containers
- WithExplicitStart interaction - how the two features work together
- Cleanup - how to remove persistent containers
- Examples - database development, shared cache across runs
Why It Matters
Users frequently ask about keeping databases running across app restarts. Current behavior is undocumented.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.