Skip to content

Instantly share code, notes, and snippets.

@timheuer
Last active November 21, 2024 14:29
Show Gist options
  • Save timheuer/694f8a3ef565b1cb5fbe616c9a1e18cc to your computer and use it in GitHub Desktop.
Save timheuer/694f8a3ef565b1cb5fbe616c9a1e18cc to your computer and use it in GitHub Desktop.
.NET 8 SDK devcontainer w/aspire
{
"name": ".NET with Aspire",
"image": "mcr.microsoft.com/dotnet/sdk:8.0",
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/devcontainers/features/github-cli:1": {
"version": "2"
},
"ghcr.io/devcontainers/features/powershell:1": {
"version": "latest"
},
"ghcr.io/azure/azure-dev/azd:0": {
"version": "latest"
},
"ghcr.io/devcontainers/features/common-utils:2": {},
"ghcr.io/nikiforovall/devcontainer-features/dotnet-aspire:1": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.vscode-dotnet-runtime",
"ms-dotnettools.csdevkit"
]
}
},
"postCreateCommand": "dotnet restore && dotnet dev-certs https"
}
@gzres
Copy link

gzres commented Feb 4, 2024

Hello, sdk:8.0 works on Debian 12 and currently there will be error during installation docker-in-docker.
For now you should use image with Debian 11 (.NET 7 or 6):

"image": "mcr.microsoft.com/dotnet/sdk:6.0",

and then add .NET 8:

"ghcr.io/devcontainers/features/dotnet:2": {
      "version": "8.0",
      "dotnetRuntimeVersions": "8.0",
      "aspNetCoreRuntimeVersions": "8.0"
    }

Best regards and happy coding

@timheuer
Copy link
Author

timheuer commented Feb 5, 2024

@gzres i use this dev container regularly. Not seeing any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment