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.245.2/containers/dotnet-postgres
3
+ {
4
+ "name" : " C# (.NET) and PostgreSQL (Community)" ,
5
+ "dockerComposeFile" : " docker-compose.yml" ,
6
+ "service" : " app" ,
7
+ "workspaceFolder" : " /workspace" ,
8
+
9
+ // Configure tool-specific properties.
10
+ "customizations" : {
11
+ // Configure properties specific to VS Code.
12
+ "vscode" : {
13
+ // Add the IDs of extensions you want installed when the container is created.
14
+ "extensions" : [
15
+ " ms-dotnettools.csharp"
16
+ ]
17
+ }
18
+ },
19
+
20
+ // Use 'forwardPorts' to make a list of ports inside the container available locally.
21
+ // "forwardPorts": [5000, 5001],
22
+
23
+ // [Optional] To reuse of your local HTTPS dev cert:
24
+ //
25
+ // 1. Export it locally using this command:
26
+ // * Windows PowerShell:
27
+ // dotnet dev-certs https --trust; dotnet dev-certs https -ep "$env:USERPROFILE/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
28
+ // * macOS/Linux terminal:
29
+ // dotnet dev-certs https --trust; dotnet dev-certs https -ep "${HOME}/.aspnet/https/aspnetapp.pfx" -p "SecurePwdGoesHere"
30
+ //
31
+ // 2. Uncomment these 'remoteEnv' lines:
32
+ // "remoteEnv": {
33
+ // "ASPNETCORE_Kestrel__Certificates__Default__Password": "SecurePwdGoesHere",
34
+ // "ASPNETCORE_Kestrel__Certificates__Default__Path": "/home/vscode/.aspnet/https/aspnetapp.pfx",
35
+ // },
36
+ //
37
+ // 3. Next, copy your certificate into the container:
38
+ // 1. Start the container
39
+ // 2. Drag ~/.aspnet/https/aspnetapp.pfx into the root of the file explorer
40
+ // 3. Open a terminal in VS Code and run "mkdir -p /home/vscode/.aspnet/https && mv aspnetapp.pfx /home/vscode/.aspnet/https"
41
+
42
+ // Use 'postCreateCommand' to run commands after the container is created.
43
+ // "postCreateCommand": "dotnet --info",
44
+
45
+ // Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
46
+ "remoteUser" : " vscode"
47
+ }
0 commit comments