pulumi/.devcontainer/devcontainer.json
Fraser Waters 285ffca793
Some improvements to the vscode devcontainer (#8243)
* Installed the go, dotnet, and python extensions by default.
* Set the gopls settings to ignore copies of modules in build directories.
* Set XDG_CACHE_DIR/CONFIG_DIR so that vscode can install go tools.
* Use "containerEnv" instead of "runArgs" to set the container environment.
* Turn on gopls "experimentalWorkspaceModule" so we can open at the root pulumi directory.
* Use "postCreateCommand" to restore all dotnet projects so ominisharp doesn't complain about missing types on startup.
2021-10-19 08:31:42 +01:00

38 lines
1.2 KiB
JSON

{
"name": "Pulumi",
"build": {
"dockerfile": "Dockerfile",
"args": {
"USER_NAME": "user",
"USER_UID": "1000"
}
},
"containerEnv": {
"PULUMI_ACCESS_TOKEN": "${localEnv:PULUMI_ACCESS_TOKEN}",
"PULUMI_TEST_ORG": "${localEnv:PULUMI_TEST_ORG}"
},
"remoteUser": "user",
"extensions": ["golang.go", "ms-dotnettools.csharp", "ms-python.python"],
// We want to dotnet restore all projects on startup so that omnisharp doesn't complain about lots of missing types on startup.
"postCreateCommand": "find -name \"*.??proj\" | xargs -L1 dotnet restore",
"settings": {
"gopls": {
// A couple of modules get copied as part of builds and this confuse gopls as it sees the module name twice, just ignore the copy in the build folders.
"build.directoryFilters": [
"-sdk/dotnet/Pulumi.Automation.Tests/bin",
"-sdk/nodejs/bin",
"-sdk/python/env"
],
// Experimental but seems to work and means we don't need a vscode instance per go.mod file.
"experimentalWorkspaceModule": true,
},
"extensions.ignoreRecommendations": true
}
}