Skip to content

Instantly share code, notes, and snippets.

@timheuer
Last active April 23, 2024 15:50
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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": {}
},
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.vscode-dotnet-runtime",
"ms-dotnettools.csdevkit"
]
}
},
"postCreateCommand": "dotnet workload update && dotnet workload install aspire && dotnet restore"
}
@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