Add Codespaces container definitions for the VMR (#15172)

Resolves https://github.com/dotnet/arcade/issues/11902
This commit is contained in:
Přemek Vysoký 2023-01-04 11:22:06 +01:00 committed by GitHub
parent a9186e3ed4
commit db1564e21d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 50 additions and 0 deletions

View file

@ -0,0 +1,17 @@
// Container contains checked-out source code only
{
"name": "Default",
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36",
"hostRequirements": {
// A completely built .NET source-tarball is >64 GB
"storage": "128gb"
},
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csharp",
"eamodio.gitlens"
]
}
}
}

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
source="${BASH_SOURCE[0]}"
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
"$scriptroot"/../../prep.sh
# GitHub Codespaces sets this and it conflicts with source-build scripts.
unset RepositoryName
"$scriptroot"/../../build.sh --online --clean-while-building || exit 0

View file

@ -0,0 +1,18 @@
// Container contains a pre-built SDK
{
"name": "Pre-built .NET SDK",
"image": "mcr.microsoft.com/dotnet-buildtools/prereqs:fedora-36",
"hostRequirements": {
// A completely built .NET source-tarball is >64 GB
"storage": "128gb"
},
"customizations": {
"vscode": {
"extensions": [
"ms-dotnettools.csharp",
"eamodio.gitlens"
]
}
},
"onCreateCommand": "${containerWorkspaceFolder}/.devcontainer/prebuilt-sdk/build.sh"
}

View file

@ -135,6 +135,10 @@ tar -zxf artifacts/x64/Release/dotnet-sdk-8.0.100-centos.8-x64.tar.gz -C $HOME/.
ln -s $HOME/.dotnet/dotnet /usr/bin/dotnet
```
### Codespaces
You can also utilize [GitHub Codespaces](https://github.com/features/codespaces) where you can find preset containers in this repository.
## List of components
To enable full offline source-building of the VMR, we have no other choice than to synchronize all the necessary code into the VMR. This also includes any code referenced via git submodules. More details on why and how this is done can be found here: