Skip to content

Commit 3ba561d

Browse files
authored
(build) add GitHub codespaces support
1 parent cae633c commit 3ba561d

File tree

3 files changed

+51
-25
lines changed

3 files changed

+51
-25
lines changed

.devcontainer/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.202.5/containers/dotnet/.devcontainer/base.Dockerfile
2+
3+
# [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
4+
ARG VARIANT="6.0-bullseye-slim"
5+
FROM mcr.microsoft.com/vscode/devcontainers/dotnet:0-${VARIANT}
6+
7+
# [Optional] Uncomment this section to install additional OS packages.
8+
# RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
9+
# && apt-get -y install --no-install-recommends <your-package-list-here>

.devcontainer/devcontainer.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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.202.5/containers/dotnet
3+
{
4+
"name": "C# (.NET)",
5+
"runArgs": ["--init"],
6+
"build": {
7+
"dockerfile": "Dockerfile",
8+
"args": {
9+
"VARIANT": "6.0",
10+
}
11+
},
12+
13+
// Set *default* container specific settings.json values on container create.
14+
"settings": {
15+
"editor.fontFamily": "'Cascadia Code', Consolas, 'Courier New', monospace",
16+
"editor.rulers": [90],
17+
"cSpell.words": [
18+
"commiting",
19+
"gittools",
20+
"gitversion"
21+
],
22+
},
23+
24+
// Add the IDs of extensions you want installed when the container is created.
25+
"extensions": [
26+
"ms-dotnettools.csharp",
27+
"EditorConfig.EditorConfig",
28+
"streetsidesoftware.code-spell-checker"
29+
],
30+
31+
"postCreateCommand": "dotnet restore src; dotnet build build",
32+
33+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
34+
"remoteUser": "vscode",
35+
"features": {
36+
"docker-in-docker": "latest",
37+
"git": "latest",
38+
"github-cli": "latest",
39+
"sshd": "latest",
40+
"powershell": "latest"
41+
}
42+
}

.vscode/GitVersion.code-workspace

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)