|
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.208.0/containers/dotnet |
| 1 | +// For format details, see https://aka.ms/devcontainer.json. For config options, see the |
| 2 | +// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet |
3 | 3 | {
|
4 |
| - "name": "Azure PowerShell (C#, .NET, TypeScript)", |
5 |
| - "build": { |
6 |
| - "dockerfile": "Dockerfile", |
7 |
| - "args": { |
8 |
| - // Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0 |
9 |
| - // Append -bullseye or -focal to pin to an OS version. |
10 |
| - "VARIANT": "6.0", |
11 |
| - // Options |
12 |
| - "NODE_VERSION": "lts/*" |
| 4 | + "name": "C# (.NET)", |
| 5 | + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile |
| 6 | + "image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0", |
| 7 | + |
| 8 | + // Features to add to the dev container. More info: https://containers.dev/features. |
| 9 | + "features": { |
| 10 | + "ghcr.io/devcontainers/features/github-cli": { |
| 11 | + "version": "latest" |
| 12 | + }, |
| 13 | + "ghcr.io/devcontainers/features/node": { |
| 14 | + "version": "lts" |
13 | 15 | }
|
14 | 16 | },
|
15 | 17 |
|
| 18 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 19 | + // "forwardPorts": [5000, 5001], |
| 20 | + // "portsAttributes": { |
| 21 | + // "5001": { |
| 22 | + // "protocol": "https" |
| 23 | + // } |
| 24 | + // } |
| 25 | + |
| 26 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 27 | + "postCreateCommand": "npm install -g autorest", |
| 28 | + |
| 29 | + // Configure tool-specific properties. |
16 | 30 | "customizations": {
|
17 | 31 | "vscode": {
|
| 32 | + // Add the IDs of extensions you want installed when the container is created. |
18 | 33 | "extensions": [
|
19 | 34 | "ms-dotnettools.csharp"
|
20 | 35 | ]
|
21 | 36 | }
|
22 | 37 | },
|
23 | 38 |
|
24 |
| - // Use 'forwardPorts' to make a list of ports inside the container available locally. |
25 |
| - // "forwardPorts": [5000, 5001], |
26 |
| - |
27 |
| - // [Optional] To reuse of your local HTTPS dev cert: |
28 |
| - // |
29 |
| - // 1. Export it locally using this command: |
30 |
| - // * Windows PowerShell: |
31 |
| - // dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" |
32 |
| - // * macOS/Linux terminal: |
33 |
| - // dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" |
34 |
| - // |
35 |
| - // 2. Uncomment these 'remoteEnv' lines: |
36 |
| - // "remoteEnv": { |
37 |
| - // "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere", |
38 |
| - // "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx", |
39 |
| - // }, |
40 |
| - // |
41 |
| - // 3. Do one of the following depending on your scenario: |
42 |
| - // * When using GitHub Codespaces and/or Remote - Containers: |
43 |
| - // 1. Start the container |
44 |
| - // 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer |
45 |
| - // 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https" |
46 |
| - // |
47 |
| - // * If only using Remote - Containers with a local container, uncomment this line instead: |
48 |
| - // "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ], |
49 |
| - |
50 |
| - // Use 'postCreateCommand' to run commands after the container is created. |
51 |
| - // "postCreateCommand": "dotnet restore", |
52 |
| - |
53 |
| - // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
54 |
| - "remoteUser": "vscode", |
55 |
| - "features": { |
56 |
| - "git": "os-provided", |
57 |
| - "powershell": "latest" |
58 |
| - } |
| 39 | + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. |
| 40 | + // this will allow us to call pwsh in scripts |
| 41 | + "remoteUser": "root" |
59 | 42 | }
|
0 commit comments