Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/dotnet/.devcontainer/base.Dockerfile
# For specifics about the dotnet base container see: https://github.com/microsoft/vscode-dev-containers/tree/main/containers/dotnet
# See https://github.com/devcontainers/images/tree/main/src/dotnet/
ARG VARIANT="10.0-noble"
FROM mcr.microsoft.com/devcontainers/dotnet:${VARIANT}

# [Choice] .NET version: 6.0, 5.0, 3.1, 2.1
ARG VARIANT="6.0-focal"
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
RUN bash -i -c 'nvm install --lts' && npm install -g @github/copilot

# Set up machine requirements to build the repo
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends cmake clang \
curl gdb gettext git libicu-dev lldb liblldb-dev libunwind8 \
llvm make python python-lldb tar wget zip
&& apt-get -y install --no-install-recommends \
clang \
cmake \
cpio \
build-essential \
python3 \
curl \
git \
lldb \
llvm \
liblldb-dev \
libunwind8 \
libunwind8-dev \
liblttng-ust-dev \
ninja-build \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
61 changes: 32 additions & 29 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,42 +1,45 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.192.0/containers/dotnet
{
"name": "C# (.NET)",
"name": "Diagnostics - Contribute",
"build": {
"dockerfile": "Dockerfile",
"args": {
// Update 'VARIANT' to pick a .NET Core version: 2.1, 3.1, 5.0
"VARIANT": "6.0",
// Options
"NODE_VERSION": "lts/*"
}
"dockerfile": "Dockerfile"
},

"settings": {
// Loading projects on demand is better for larger codebases
"omnisharp.enableMsBuildLoadProjectsOnDemand": true,
"omnisharp.enableRoslynAnalyzers": true,
"omnisharp.enableEditorConfigSupport": true,
"omnisharp.enableAsyncCompletion": true,
"hostRequirements": {
"cpus": 4,
"memory": "8gb",
"storage": "64gb"
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"ms-dotnettools.csharp",
"ms-vscode.cpptools-extension-pack"
],

// Needed to debug sos extension under container.
"privileged": true,
"features": {
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/docker-in-docker": {}
},
"customizations": {
"codespaces": {
"extensions": [
"ms-dotnettools.csdevkit",
"GitHub.copilot",
"GitHub.copilot-chat"
],
"settings": {
"remote.autoForwardPorts": true,
"remote.autoForwardPortsSource": "hybrid",
"remote.otherPortsAttributes": {
"onAutoForward": "ignore"
},
"dotnet.defaultSolution": "build.sln"
}
}
},
"postStartCommand": "${containerWorkspaceFolder}/dotnet.sh --info",
"capAdd": [ "SYS_PTRACE" ],

// 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.
// Add the global tools dir to the PATH so that globally installed tools will work
"remoteEnv": {
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerWorkspaceFolder}/.dotnet-tools-global:${containerEnv:PATH}",
"DOTNET_MULTILEVEL_LOOKUP": "0"
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}"
},

// Comment out to connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
// This one is defined by common-utils in the dotnet devcontainer base image.
"remoteUser": "vscode"
}
}