mirror of
https://github.com/VSadov/Satori.git
synced 2025-06-08 03:27:04 +09:00
Improve DevContainer configuration for Codespaces (#91465)
Adds a default configuration that comes with all the dependencies preinstalled, but not prebuilt. This reduces confusion if you don't use the "New with options..." dropdown when creating the Codespace since you'd just get a standard Ubuntu container then. Also install a specific version of dotnet-serve.
This commit is contained in:
parent
f6b6415119
commit
2aea2440a5
5 changed files with 52 additions and 4 deletions
48
.devcontainer/devcontainer.json
Normal file
48
.devcontainer/devcontainer.json
Normal file
|
@ -0,0 +1,48 @@
|
|||
// For format details, see https://aka.ms/devcontainer.json.
|
||||
{
|
||||
"name": "Standard configuration",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"args": {
|
||||
// Update 'VARIANT' to pick a .NET Core version: 6.0, 7.0
|
||||
"VARIANT": "6.0-jammy"
|
||||
}
|
||||
},
|
||||
"hostRequirements": {
|
||||
"cpus": 4,
|
||||
"memory": "8gb"
|
||||
},
|
||||
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/github-cli:1": {}
|
||||
},
|
||||
|
||||
// Configure tool-specific properties.
|
||||
"customizations": {
|
||||
// Configure properties specific to VS Code.
|
||||
"vscode": {
|
||||
// Add the IDs of extensions you want installed when the container is created.
|
||||
"extensions": [
|
||||
"ms-dotnettools.csharp"
|
||||
],
|
||||
"settings": {
|
||||
// Loading projects on demand is better for larger codebases
|
||||
"omnisharp.enableMsBuildLoadProjectsOnDemand": true,
|
||||
"omnisharp.enableRoslynAnalyzers": true,
|
||||
"omnisharp.enableEditorConfigSupport": true,
|
||||
"omnisharp.enableAsyncCompletion": true,
|
||||
"omnisharp.testRunSettings": "${containerWorkspaceFolder}/artifacts/obj/vscode/.runsettings"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Add the locally installed dotnet to the path to ensure that it is activated
|
||||
// This allows developers to just use 'dotnet build' on the command-line, and the local dotnet version will be used.
|
||||
"remoteEnv": {
|
||||
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
|
||||
"DOTNET_MULTILEVEL_LOOKUP": "0"
|
||||
},
|
||||
|
||||
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
|
||||
"remoteUser": "vscode"
|
||||
}
|
|
@ -1,8 +1,8 @@
|
|||
// For format details, see https://aka.ms/devcontainer.json.
|
||||
{
|
||||
"name": "C# (.NET)",
|
||||
"name": "Libraries/Runtime development (prebuilt)",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"dockerfile": "../Dockerfile",
|
||||
"args": {
|
||||
// Update 'VARIANT' to pick a .NET Core version: 6.0, 7.0
|
||||
"VARIANT": "6.0-jammy"
|
||||
|
|
|
@ -19,7 +19,7 @@ case "$opt" in
|
|||
./build.sh mono+libs -os browser -c Release
|
||||
|
||||
# install dotnet-serve for running wasm samples
|
||||
./dotnet.sh tool install dotnet-serve --tool-path ./.dotnet-tools-global
|
||||
./dotnet.sh tool install dotnet-serve --version 1.10.172 --tool-path ./.dotnet-tools-global
|
||||
;;
|
||||
esac
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// For format details, see https://aka.ms/devcontainer.json.
|
||||
{
|
||||
"name": "C# (.NET)",
|
||||
"name": "WASM development (prebuilt)",
|
||||
"build": {
|
||||
"dockerfile": "Dockerfile",
|
||||
"args": {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue