-
Notifications
You must be signed in to change notification settings - Fork 385
Modernize devcontainer #5636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hoyosjs
wants to merge
1
commit into
dotnet:main
Choose a base branch
from
hoyosjs:juhoyosa/modernize-container
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Modernize devcontainer #5636
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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" | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we no longer need privileged to debug sos extension? Is that was SYS_PTRACE is added for?