-
Notifications
You must be signed in to change notification settings - Fork 23
/
devcontainer.json
48 lines (48 loc) · 2.42 KB
/
devcontainer.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet
{
"name": "Bank API dotnet9",
"image": "mcr.microsoft.com/devcontainers/dotnet:dev-9.0-bookworm", // bookworm is more up to date (with .NET SDK) than noble
"customizations": {
"vscode": {
"extensions": [
"donjayamanne.githistory",
"humao.rest-client",
"ms-azuretools.vscode-docker",
"ms-dotnettools.vscode-dotnet-runtime",
"ms-dotnettools.csharp",
"ms-dotnettools.csdevkit",
"ms-vscode-remote.remote-containers",
"ms-graph.kiota",
"stoplight.spectral"
],
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"dotnetAcquisitionExtension.sharedExistingDotnetPath": "/usr/share/dotnet/dotnet"
}
}
},
"containerEnv": {
"DOTNET_LAUNCH_PROFILE": "http"
},
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/dotnet:2": {
"version": "none", // already pre-installed with image
"aspNetCoreRuntimeVersions": "8.0" // for: https://github.com/microsoft/vscode-dotnettools/issues/1094
},
"ghcr.io/devcontainers/features/azure-cli:1": {}, // for using the host az cli credentials
"ghcr.io/devcontainers/features/docker-in-docker:2": {} // for .NET Aspire resource emulation
},
"remoteUser": "root", //have to use root because of permission issue during dotnet build: https://github.com/microsoft/vscode-remote-release/issues/9099#issuecomment-2290470364
"mounts": [
// Bind the azure (credential) folder, requires an unencrypted token cache (assuming host is Windows).
// On your host, run `az config set core.encrypt_token_cache=false` first, login again, then start the container
// Please read: https://github.com/AzureAD/microsoft-authentication-library-for-dotnet/issues/3033 for more information
"source=${localEnv:HOME}${localEnv:USERPROFILE}/.azure,target=/root/.azure,type=bind",
// Bind the Visual Studio Token provider folder
"source=${localEnv:HOME}${localEnv:LOCALAPPDATA}/.IdentityService,target=/root/.IdentityService,type=bind",
// Bind ASP.NET user secrets folder (please see https://learn.microsoft.com/en-us/aspnet/core/security/app-secrets?view=aspnetcore-9.0&tabs=windows#how-the-secret-manager-tool-works)
"source=${localEnv:APPDATA}/Microsoft/UserSecrets,target=/root/.microsoft/usersecrets,type=bind"
]
}