Custom Container Registry Support & Lifetime Default Alignment #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: Custom Container Registry Support & Lifetime Default Alignment
📝 Description
What does this PR do?
This PR introduces two major improvements:
Custom Container Registry Support: Adds the ability to pull LocalStack container images from private registries (Artifactory, Azure Container Registry, AWS ECR, GitHub Container Registry, etc.) to support enterprise environments with strict security requirements.
Lifetime Default Alignment: Changes the default container lifetime from
PersistenttoSessionto align with .NET Aspire's conventions and our own documentation recommendations.Related Issue(s):
🔄 Type of Change
🎯 Aspire Compatibility
🧪 Testing
How has this been tested?
Test Environment:
📚 Documentation
Lifetimeproperty docs with detailed behavior descriptionsPortproperty docs showing interaction with Lifetime✅ Code Quality Checklist
🔍 Additional Notes
Breaking Changes
Lifetime Default Change:
Persistent→SessionImpact:
Migration Path:
Users who want the previous
Persistentbehavior can explicitly set:Rationale:
SessionSessionwhile defaulting toPersistent(confusing)Performance Impact
Positive:
Neutral:
Dependencies
No new dependencies added. All changes use existing Aspire APIs.
🎯 Reviewer Focus Areas
Please pay special attention to:
📸 Screenshots/Examples
Custom Container Registry Usage
Azure Container Registry
AWS ECR
Migration: Persistent Lifetime
📊 Test Results
All 43 related unit tests passing on both .NET 8.0 and .NET 9.0:
🔗 Related Work
This PR builds on:
🎯 Follow-up Items
None. This PR is complete and ready for review.
By submitting this pull request, I confirm that:
Note
Adds registry/image/tag overrides for the LocalStack container and changes the default container lifetime to Session with updated port behavior and docs.
LocalStackContainerOptions: defaultLifetimechanged toSession; addedContainerRegistry,ContainerImage,ContainerImageTag; expanded XML docs; clarifiedPortbehavior.AddLocalStack(...): honors custom imageregistry/image/tag; endpoint port selection updated to depend onLifetimeunlessPortis set.docs/CONFIGURATION.mdupdated: Session as default; detailed port behavior; new custom registry/image/tag configuration with examples and scenarios; configuration patterns adjusted.Written by Cursor Bugbot for commit b4692c5. This will update automatically on new commits. Configure here.