Skip to content
Skills Library
DevOps & cloud · Building & coding

aspire

/aspire

Use when configuring dev containers for .NET Aspire projects. Covers the Aspire workload, Docker-in-Docker requirement, dashboard port forwarding, and multi-service orchestration in Codespaces. USE FOR: .NET Aspire dev containers, Aspire workload in Codespaces, Aspire dashboard port forwarding, Aspire + Docker-in-Docker setup DO NOT USE FOR: general .NET dev containers without Aspire (use dotnet), standalone Docker-in-Docker (use docker-in-docker), general devcontainer.json (use devcontainer)

Licence
MIT
Last repository change
09.06.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
13
Scripts
0
HTML comments
0
URLs in SKILL.md
3
Deprecation

No signals detected. Repository changed on 09.06.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Use when configuring dev containers for .NET Aspire projects. Covers the Aspire workload, Docker-in-Docker requirement, dashboard port forwarding, and multi-service orchestration in Codespaces. USE FOR: .NET Aspire dev containers, Aspire workload in Codespaces, Aspire dashboard port forwarding, Aspire + Docker-in-Docker setup DO NOT USE FOR: general .NET dev containers without Aspire (use dotnet), standalone Docker-in-Docker (use docker-in-docker), general devcontainer.json (use devcontainer)

Original author description

Use when configuring dev containers for .NET Aspire projects. Covers the Aspire workload, Docker-in-Docker requirement, dashboard port forwarding, and multi-service orchestration in Codespaces. USE FOR: .NET Aspire dev containers, Aspire workload in Codespaces, Aspire dashboard port forwarding, Aspire + Docker-in-Docker setup DO NOT USE FOR: general .NET dev containers without Aspire (use dotnet), standalone Docker-in-Docker (use docker-in-docker), general devcontainer.json (use devcontainer)

How it works

  1. Overview
  2. Minimal Configuration
  3. Using the Dotnet Feature with Aspire Workload
  4. Why Docker-in-Docker Is Required
  5. Port Forwarding
  6. Full Example with App Host
  7. Running Aspire
  8. Best Practices
Original SKILL.md headings · 139 lines, 508 words
SKILL.md preview
---
name: aspire
description: |
    Use when configuring dev containers for .NET Aspire projects. Covers the Aspire workload, Docker-in-Docker requirement, dashboard port forwarding, and multi-service orchestration in Codespaces.
    USE FOR: .NET Aspire dev containers, Aspire workload in Codespaces, Aspire dashboard port forwarding, Aspire + Docker-in-Docker setup
    DO NOT USE FOR: general .NET dev containers without Aspire (use dotnet), standalone Docker-in-Docker (use docker-in-docker), general devcontainer.json (use devcontainer)
license: MIT
metadata:
  displayName: "Dev Container — Aspire"
  author: "Tyler-R-Kendrick"
compatibility: claude, copilot, cursor
references:
  - title: ".NET Aspire Official Documentation"
    url: "https://learn.microsoft.com/en-us/dotnet/aspire/"
  - title: "Dev Containers Specification"
    url: "https://containers.dev/"
---

# Dev Container — Aspire

## Overview
.NET Aspire orchestrates multi-service distributed applications and launches containers for dependencies (Redis, PostgreSQL, RabbitMQ, etc.) at runtime. Running Aspire in a dev container requires Docker-in-Docker because the Aspire app host starts containers via the Docker API.

## Minimal Configuration
```jsonc
{
  "name": "Aspire",
  "image": "mcr.microsoft.com/devcontainers/dotnet:9.0",
  "features": {
    "ghcr.io/devcontainers/features/docker-in-docker:2": {
      "version": "latest",
      "dockerDashComposeVersion": "v2"
    }
  },
  "postCreateCommand": "dotnet workload install aspire && dotnet restore",
  "forwardPorts": [15888, 18888],
  "portsAttributes": {
    "15888": { "label": "Aspire Dashboard (HTTP)", "onAutoForward": "notify" },
    "18888": { "label": "Aspire Dashboard (HTTPS)", "onAutoForward": "notify" }
  },
  "customizations": {
    "vscode": {
      "extensions": [
        "ms-dotnettools.csdevkit",
        "ms-dotnettools.csharp",
        "ms-azuretools.vscode-docker"
      ]
    }
  }
}
```

## Using the Dotnet Feature with Aspire Workload
If you need a base image with other features:
```jsonc
{
  "image": "mcr.microsoft.com/devcontainers/base:ubuntu",
  "features": {
    "ghcr.io/devcontainers/features/dotnet:2": {
      "version": "9.0",
      "workloads": "aspire"
    },
    "ghcr.io/devcontainers/features/docker-in-docker:2": {}
  }
}
```

## Why Docker-in-Docker Is Required
Aspire's app host uses the Docker API to:
- Pull and run container images for resources (Redis, PostgreSQL, RabbitMQ, Kafka, etc.)
- Manage container lifecycle and networking
- Wire up service discovery between containers and .NET projects

Without DinD, `docker` commands inside the dev container will fail. Always include the `docker-in-docker` feature.

## Port Forwarding
Aspire uses several ports. Forward them so the dashboard and services are accessible:

| Port | Service |
|------|---------|
| 15888 | Aspire Dashboard (HTTP) |
| 18888 | Aspire Dashboard (HTTPS) |
| 5000–5010 | Application HTTP endpoints (varies) |
| 5432 | PostgreSQL (if used) |
| 6379 | Redis (if used) |
| 5672 | RabbitMQ (if used) |

Use a port range or `"onAutoForward": "notify"` for dynamic ports:
```jsonc
{
  "forwardPorts": [15888, 18888, "5000-5010"],
  "portsAttributes": {
    "5000-5010": { "onAutoForward": "notify" }
  }
}
```

## Full Example with App Host
```jsonc
{
  "name": "Aspire Distributed App",
  "image": "mcr.microsoft.com/devcontainers/dotnet:9.0",
  "features": {
    "ghcr.io/devcontainers/features/docker-in-docker:2": {
      "version": "latest",
      "dockerDashComposeVersion": "v2"
    },
    "ghcr.io/devcontainers/features/node:1": {
      "version": "22"
    },
    "ghcr.io/devcontainers/features/github-cli:1": {}
  },
  "forwardPorts": [15888, 18888, 5000, 5001, 5173],
  "postCreateCommand": {
    "workloads": "dotnet workload install aspire",
    "restore": "dotnet restore",
    "frontend": "cd src/Web && npm ci"
  },
  "containerEnv": {
    "ASPNETCORE_ENVIRONMENT": "Development",
    "DOTNET_CLI_TELEMETRY_OPTOUT": "1"
  },
  "customizations": {
    "vscode": {
      "extensions": [
        "ms-dotnettools.csdevkit",
        "ms-dotnettools.csharp",
        "ms-azuretools.vscode-docker"
      ],
      "settings": {
        "dotnet.defaultSolution": "MyApp.sln"
      }
    }
  }
}
```

## Running Aspire
After the container is created:
```bash
# Run the Aspire app host
dotnet run --project src/MyApp.AppHost

# The dashboard opens at http://localhost:15888
# Aspire automatically pulls and starts container dependencies
```

## Best Practices
- Always include `docker-in-docker:2` — Aspire cannot function without Docker access.
- Install the Aspire workload via the dotnet feature's `workloads` option (cached in prebuilds) rather than `postCreateCommand` when possible.
- Forward the dashboard ports (15888/18888) and set `"onAutoForward": "notify"` for service ports.
- Set `ASPNETCORE_ENVIRONMENT=Development` in `containerEnv` for development-time behavior.
- Add the Node feature if your Aspire solution includes a frontend project (React, Angular, etc.).
- Use Codespaces prebuilds to cache the Aspire workload install and `dotnet restore` — these can be slow.
- Pin the .NET SDK version to match your `global.json` for consistency across the team.
Files in this package (13)
  • AGENTS.md 4 KB
  • README.md 1 KB
  • SKILL.md 5 KB
  • metadata.json 1 KB
  • rules/_sections.md 1 KB
  • rules/_template.md 1 KB
  • rules/aspire-add-the-node-feature-if-your-aspire-solution-includes-a.md 1 KB
  • rules/aspire-always-include-docker-in-docker.md 1 KB
  • rules/aspire-forward-the-dashboard-ports-15888-18888-and-set.md 1 KB
  • rules/aspire-install-the-aspire-workload-via-the-dotnet-feature-s.md 1 KB
  • rules/aspire-pin-the-net-sdk-version-to-match-your-global.md 1 KB
  • rules/aspire-set-aspnetcore-environment-development-in-containerenv.md 1 KB
  • rules/aspire-use-codespaces-prebuilds-to-cache-the-aspire-workload.md 1 KB

Versions

RepositoryScoreLicence
This page · Tyler-R-Kendrick/agent-skills100MIT
managedcode/dotnet-skills100MIT
thangchung/agent-engineering-experiment100MIT
codewithmukesh/dotnet-claude-kit100MIT
FritzAndFriends/BlazorWebFormsComponents100MIT
Tyler-R-Kendrick/agent-skills100MIT
nikiforovall/keycloak-authorization-services-dotnet100MIT
thangchung/agent-engineering-experiment90MIT

Database snapshot: 13.11.2026 · package version 41eceaa550be (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 88dev-loop-dev-container
    Use when the user asks about development containers, devcontainer.json, Dev Containers in VS Code/GitHub Codespaces, Docker-based dev environments, or reproducible development setups. Do NOT use for: production Dockerfiles, or CI/CD pipelines.
  • 100dotnet
    Use when configuring dev containers for .NET projects. Covers the dotnet feature, SDK versions, workloads, C# Dev Kit extensions, and NuGet configuration. USE FOR: .NET dev container setup, dotnet SDK feature, C# Dev Kit extensions, NuGet configuration, .NET workloads in…
  • 100devcontainers
    Use when the user asks to create, configure, or troubleshoot dev containers, devcontainer.json files, or GitHub Codespaces setups. Creates and configures devcontainer.json, adds features and lifecycle hooks, supports Docker Compose dev environments, and validates container setup…
  • 100docker-in-docker
    Use when configuring Docker-in-Docker inside a dev container or Codespace. Covers the DinD feature, Docker Compose, building images, and running containers from within the dev environment. USE FOR: running Docker inside dev containers, DinD feature configuration, building images…
  • 100aspire-monitoring
    **ANALYSIS SKILL** - Observe Aspire apps: logs, traces, metrics, resource state, telemetry export, browser telemetry, and the standalone dashboard. Routes between local Aspire CLI, AKS workload diagnostics, and deployed Azure resource health. USE FOR: aspire logs, aspire otel…
  • 100aspire-monitoring
    **ANALYSIS SKILL** - Observe Aspire apps: logs, traces, metrics, resource state, telemetry export, browser telemetry, and the standalone dashboard. Routes between local Aspire CLI, AKS workload diagnostics, and deployed Azure resource health. USE FOR: aspire logs, aspire otel…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.