|
1 |
| -// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: |
2 |
| -// https://github.com/microsoft/vscode-dev-containers/tree/v0.191.0/containers/dotnetcore |
3 |
| -{ |
4 |
| - "name": "C# Sample", |
5 |
| - "build": { |
6 |
| - "dockerfile": "Dockerfile", |
7 |
| - "args": { |
8 |
| - // Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0 |
9 |
| - "VARIANT": "3.1", |
10 |
| - "NODE_VERSION": "lts/*", |
11 |
| - "INSTALL_AZURE_CLI": "false" |
12 |
| - } |
13 |
| - }, |
14 |
| - |
15 |
| - // Configure tool-specific properties. |
16 |
| - "customizations": { |
17 |
| - // Configure properties specific to VS Code. |
18 |
| - "vscode": { |
19 |
| - // Set *default* container specific settings.json values on container create. |
20 |
| - "settings": {}, |
21 |
| - |
22 |
| - // Add the IDs of extensions you want installed when the container is created. |
23 |
| - "extensions": [ |
24 |
| - "ms-dotnettools.csharp" |
25 |
| - ] |
26 |
| - } |
27 |
| - }, |
28 |
| - |
29 |
| - // Use 'forwardPorts' to make a list of ports inside the container available locally. |
30 |
| - // "forwardPorts": [5000, 5001], |
31 |
| - |
32 |
| - // Use 'portsAttributes' to set default properties for specific forwarded ports. More info: https://code.visualstudio.com/docs/remote/devcontainerjson-reference. |
33 |
| - "portsAttributes": { |
34 |
| - "5000": { |
35 |
| - "label": "Hello Remote World", |
36 |
| - "onAutoForward": "notify" |
37 |
| - } |
38 |
| - }, |
39 |
| - |
40 |
| - // Use 'otherPortsAttributes' to configure any ports that aren't configured using 'portsAttributes'. |
41 |
| - // "otherPortsAttributes": { |
42 |
| - // "onAutoForward": "silent" |
43 |
| - // }, |
44 |
| - |
45 |
| - // [Optional] To reuse of your local HTTPS dev cert: |
46 |
| - // |
47 |
| - // 1. Export it locally using this command: |
48 |
| - // * Windows PowerShell: |
49 |
| - // dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" |
50 |
| - // * macOS/Linux terminal: |
51 |
| - // dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" |
52 |
| - // |
53 |
| - // 2. Uncomment these 'remoteEnv' lines: |
54 |
| - // "remoteEnv": { |
55 |
| - // "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere", |
56 |
| - // "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx", |
57 |
| - // }, |
58 |
| - // |
59 |
| - // 3. Do one of the following depending on your scenario: |
60 |
| - // * When using GitHub Codespaces and/or Remote - Containers: |
61 |
| - // 1. Start the container |
62 |
| - // 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer |
63 |
| - // 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https" |
64 |
| - // |
65 |
| - // * If only using Remote - Containers with a local container, uncomment this line instead: |
66 |
| - // "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ], |
67 |
| - |
68 |
| - // Use 'postCreateCommand' to run commands after the container is created. |
69 |
| - // "postCreateCommand": "dotnet restore", |
70 |
| - |
71 |
| - // Comment this out to connect as a root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
72 |
| - "remoteUser": "vscode" |
73 |
| -} |
| 1 | +// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: |
| 2 | +// https://github.com/devcontainers/templates/tree/main/src/dotnet |
| 3 | + |
| 4 | +{ |
| 5 | + "name": "C# (.NET) Sample", |
| 6 | + "build": { |
| 7 | + "dockerfile": "Dockerfile", |
| 8 | + "args": { |
| 9 | + // Update 'VARIANT' to pick a .NET Core version: 3.1, 6.0 |
| 10 | + // Append -bullseye or -focal to pin to an OS version. |
| 11 | + "VARIANT": "6.0-bullseye", |
| 12 | + // Options |
| 13 | + "NODE_VERSION": "none" |
| 14 | + } |
| 15 | + }, |
| 16 | + // Set *default* container specific settings.json values on container create. |
| 17 | + "settings": {}, |
| 18 | + // Sets the ports that will be mapped to localhost or Codespaces. |
| 19 | + "portsAttributes": { |
| 20 | + "3000": { |
| 21 | + "label": "Hello Remote World", |
| 22 | + "onAutoForward": "notify" |
| 23 | + } |
| 24 | + }, |
| 25 | + // Configure tool-specific properties. |
| 26 | + "customizations": { |
| 27 | + // Configure properties specific to VS Code. |
| 28 | + "vscode": { |
| 29 | + // Add the IDs of extensions you want installed when the container is created. |
| 30 | + "extensions": [ |
| 31 | + "ms-dotnettools.csharp" |
| 32 | + ] |
| 33 | + } |
| 34 | + }, |
| 35 | + |
| 36 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 37 | + // "forwardPorts": [5000, 5001], |
| 38 | + |
| 39 | + // [Optional] To reuse of your local HTTPS dev cert: |
| 40 | + // |
| 41 | + // 1. Export it locally using this command: |
| 42 | + // * Windows PowerShell: |
| 43 | + // dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" |
| 44 | + // * macOS/Linux terminal: |
| 45 | + // dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" |
| 46 | + // |
| 47 | + // 2. Uncomment these 'remoteEnv' lines: |
| 48 | + // "remoteEnv": { |
| 49 | + // "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere", |
| 50 | + // "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx", |
| 51 | + // }, |
| 52 | + // |
| 53 | + // 3. Do one of the following depending on your scenario: |
| 54 | + // * When using GitHub Codespaces and/or Remote - Containers: |
| 55 | + // 1. Start the container |
| 56 | + // 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer |
| 57 | + // 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https" |
| 58 | + // |
| 59 | + // * If only using Remote - Containers with a local container, uncomment this line instead: |
| 60 | + // "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ], |
| 61 | + |
| 62 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 63 | + // "postCreateCommand": "dotnet restore", |
| 64 | + |
| 65 | + // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
| 66 | + "remoteUser": "vscode" |
| 67 | +} |
0 commit comments