|
| 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.177.0/containers/dotnet |
| 3 | +{ |
| 4 | + "name": "C# (.NET)", |
| 5 | + "runArgs": ["--init"], |
| 6 | + "build": { |
| 7 | + "dockerfile": "Dockerfile", |
| 8 | + "args": { |
| 9 | + // Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0 |
| 10 | + "VARIANT": "3.1", |
| 11 | + // Options |
| 12 | + "NODE_VERSION": "lts/*", |
| 13 | + "INSTALL_AZURE_CLI": "false" |
| 14 | + } |
| 15 | + }, |
| 16 | + |
| 17 | + // Set *default* container specific settings.json values on container create. |
| 18 | + "settings": {}, |
| 19 | + |
| 20 | + // Add the IDs of extensions you want installed when the container is created. |
| 21 | + "extensions": [ |
| 22 | + "ms-dotnettools.csharp" |
| 23 | + ], |
| 24 | + |
| 25 | + // Use 'forwardPorts' to make a list of ports inside the container available locally. |
| 26 | + // "forwardPorts": [5000, 5001], |
| 27 | + |
| 28 | + // [Optional] To reuse of your local HTTPS dev cert: |
| 29 | + // |
| 30 | + // 1. Export it locally using this command: |
| 31 | + // * Windows PowerShell: |
| 32 | + // dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" |
| 33 | + // * macOS/Linux terminal: |
| 34 | + // dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere" |
| 35 | + // |
| 36 | + // 2. Uncomment these 'remoteEnv' lines: |
| 37 | + // "remoteEnv": { |
| 38 | + // "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere", |
| 39 | + // "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx", |
| 40 | + // }, |
| 41 | + // |
| 42 | + // 3. Do one of the following depending on your scenario: |
| 43 | + // * When using GitHub Codespaces and/or Remote - Containers: |
| 44 | + // 1. Start the container |
| 45 | + // 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer |
| 46 | + // 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https" |
| 47 | + // |
| 48 | + // * If only using Remote - Containers with a local container, uncomment this line instead: |
| 49 | + // "mounts": [ "source=${env:HOME}${env:USERPROFILE}/.aspnet/https,target=/home/vscode/.aspnet/https,type=bind" ], |
| 50 | + |
| 51 | + // Use 'postCreateCommand' to run commands after the container is created. |
| 52 | + // "postCreateCommand": "dotnet restore", |
| 53 | + |
| 54 | + // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root. |
| 55 | + "remoteUser": "vscode" |
| 56 | +} |
0 commit comments