Description
Describe the issue or suggestion
So, I noticed in the documentation and playground directory in the source code that there seems to be no mention or little mention of how to use aspire in dev container based workflow.
here is one that I have been using very frequently to spin up apps
{
"name": "Aspire & Dapr",
"image": "mcr.microsoft.com/devcontainers/dotnet:8.0-jammy",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
"version": "latest",
"enableNonRootDocker": true,
"moby": true
},
"ghcr.io/prom3theu5/aspirational-manifests/aspirate:latest": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/azure/azure-dev/azd:0": {
"version": "latest"
},
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/dapr/cli/dapr-cli:0": {}
},
"runArgs": [
"--sysctl",
"net.ipv6.conf.all.disable_ipv6=0",
"--sysctl",
"net.ipv6.conf.default.forwarding=1",
"--sysctl",
"net.ipv6.conf.all.forwarding=1"
],
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csdevkit",
"ms-azuretools.vscode-dapr",
"ms-azuretools.vscode-docker",
"redhat.vscode-yaml",
"streetsidesoftware.code-spell-checker",
"ms-azuretools.vscode-bicep",
"eamodio.gitlens"
]
}
},
"postCreateCommand": "dotnet workload update && dotnet workload install aspire && dotnet tool install -g aspirate --prerelease && docker compose up -d && dapr init",
"remoteUser": "root"
}
while there are definitely better ways that something like this could be done, I do want to see if some mention and examples of dev containers could be added to the documentation.
New Section To Getting Started
For example, I think that a "dev container based" getting started guide would be really useful for those who are hesitant to download anything new or in preview to their laptop.
- I think a local devcontainers walkthrough would be beneficial
- I also think instructions on how to get going with aspire in github codespaces would also be beneficial
Adding Example Dev Containers Files To Project
There are many ways to work with Dotnet aspire and there's no one way to setup your dev container. For example, if your local workflow is just using aspire to spin up a .net api that is using a local sql server, then your dev container file is going to look very different to someone that is using dcp to orchestrate containers or integrate dapr. So I think a page with some example code block examples with example scenarios would be beneficial.
-
stateless .net apps only (just .net project resources)
-
having a node js based resource (adding node feature)
-
container resources in app host (with notes about dind, ipv6 args, implications of dind and how that working, not being able to have a dind workflow in rancher desktop but able to with docker desktop at the moment (seems unrelated, but it has some implications on how someone might use or decide on whether or not to use aspire and it's orchestration abilities)
-
Dapr Examples
- Using the built in in-memory components from aspire dapr (built in addstatestore and addpubsub)
- DinD based workflow that uses docker or docker compose to build up backends for dapr
- external cloud usage, like using azure cloud provisioned resources
-
Aspirate Example
- DinD Example
- minikube?
- kind?
- DofD Example
- How you can have a DinD devcontainer for inner loop development and have a dofd dev container for aspirate usage and deployment to kubernetes usage
- DinD Example
-
an example that uses bicep files (so having the appropriate extensions and features would be noted)
Metadata
Metadata
Assignees
Type
Projects
Status