-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathdevcontainer.json
49 lines (49 loc) · 2.57 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
49
// 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": [
"humao.rest-client",
"ms-dotnettools.csdevkit",
"ms-graph.kiota",
"stoplight.spectral",
"streetsidesoftware.code-spell-checker",
"github.copilot"
],
"settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"dotnetAcquisitionExtension.sharedExistingDotnetPath": "/usr/share/dotnet/dotnet"
}
}
},
"containerEnv": {
"DOTNET_LAUNCH_PROFILE": "http",
// Zscaler proxy support when reading custom rulesets over https in Spectral
"NODE_EXTRA_CA_CERTS": "${containerWorkspaceFolder}/.certs/ZscalerRootCA.crt"
},
// 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
},
"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=/home/vscode/.azure,type=bind",
// Bind the Visual Studio Token provider folder
"source=${localEnv:HOME}${localEnv:LOCALAPPDATA}/.IdentityService,target=/home/vscode/.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=/home/vscode/.microsoft/usersecrets,type=bind"
],
// Remove absolutely every file on the .gitignore list, so we don't run into permission issues.
// Also see https://github.com/microsoft/vscode-remote-release/issues/9099#issuecomment-2541564211
"postStartCommand": "git clean -xdf && dotnet dev-certs https --trust"
}