Skip to content

Commit 924875b

Browse files
committed
adds and configures a dev container for code spaces
1 parent 6f87020 commit 924875b

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

.devcontainer/Docker

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/dotnet/.devcontainer/base.Dockerfile
2+
# [Choice] .NET version: 6.0, 5.0, 3.1, 6.0-bullseye, 5.0-bullseye, 3.1-bullseye, 6.0-focal, 5.0-focal, 3.1-focal
3+
ARG VARIANT="6.0-bullseye"
4+
FROM mcr.microsoft.com/vscode/devcontainers/dotnet
5+
6+
# "install" the dotnet 3.1 & 6.0 runtime for tests
7+
COPY --from=mcr.microsoft.com/dotnet/sdk:3.1 /usr/share/dotnet/shared /usr/share/dotnet/shared
8+
COPY --from=mcr.microsoft.com/dotnet/sdk:6.0 /usr/share/dotnet/shared /usr/share/dotnet/shared
9+
10+
# Add mono complete for omnisharp
11+
RUN apt-get install -y mono-complete

.devcontainer/devcontainer.json

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/dotnet
3+
{
4+
"name": "Octokit.net",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"args": {
8+
// Update 'VARIANT' to pick a .NET Core version: 3.1, 5.0, 6.0
9+
// Append -bullseye or -focal to pin to an OS version.
10+
"VARIANT": "latest"
11+
}
12+
},
13+
// Set *default* container specific settings.json values on container create.
14+
"settings": {
15+
"omnisharp.path": "latest",
16+
"omnisharp.defaultLaunchSolution": "Octokit.GraphQL.sln",
17+
"omnisharp.disableMSBuildDiagnosticWarning": false,
18+
"omnisharp.useModernNet": true,
19+
"omnisharp.enableAsyncCompletion": true,
20+
"omnisharp.enableEditorConfigSupport": true,
21+
"omnisharp.enableImportCompletion": true,
22+
"omnisharp.enableRoslynAnalyzers": true,
23+
"omnisharp.organizeImportsOnFormat": true
24+
},
25+
// Add the IDs of extensions you want installed when the container is created.
26+
"extensions": [
27+
"ms-dotnettools.csharp",
28+
"eamodio.gitlens",
29+
"fernandoescolar.vscode-solution-explorer",
30+
"redhat.vscode-yaml"
31+
],
32+
// This is needed so that the C# extension can resolve to the correct SDK version
33+
"remoteEnv": {
34+
"PATH": "${containerWorkspaceFolder}/.dotnet:${containerEnv:PATH}",
35+
"DOTNET_MULTILEVEL_LOOKUP": "0",
36+
"TARGET": "net7.0",
37+
"DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER": "true"
38+
}
39+
}

0 commit comments

Comments
 (0)