microsoft / microsoft/aspire.dev

[What's New Analysis] Create persistent containers documentation

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

@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

  1. When to use persistent containers - stateful services, databases, long-running processes
  2. Lifecycle behavior - what happens on app restart
  3. Networking - automatic network creation, isolation from session containers
  4. WithExplicitStart interaction - how the two features work together
  5. Cleanup - how to remove persistent containers
  6. 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

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.