Skip to content

Commit ce7baa7

Browse files
askptCopilot
andauthored
chore: add devcontainer support (#584)
* chore: remove .devcontainer from .gitignore and add devcontainer.json Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> * chore: add devcontainer configuration for OpenFeature .NET SDK Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> * fix: remove unnecessary extensions from devcontainer configuration Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> * fix: update devcontainer image and dotnet version to 9.0 Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> * docs: add development containers section to CONTRIBUTING.md Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> * chore: add postCreateCommand to initialize git submodules in devcontainer Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> * Update .devcontainer/devcontainer.json Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> * fix: standardize memory value format in devcontainer configuration Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> --------- Signed-off-by: André Silva <2493377+askpt@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent fdf2297 commit ce7baa7

File tree

3 files changed

+53
-1
lines changed

3 files changed

+53
-1
lines changed

.devcontainer/devcontainer.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "OpenFeature .NET SDK",
3+
"image": "mcr.microsoft.com/devcontainers/dotnet:9.0-bookworm",
4+
"features": {
5+
"ghcr.io/devcontainers/features/dotnet:latest": {
6+
"version": "9.0",
7+
"additionalVersions": "8.0"
8+
},
9+
"ghcr.io/devcontainers/features/github-cli:latest": {},
10+
"ghcr.io/devcontainers/features/docker-in-docker": {}
11+
},
12+
"customizations": {
13+
"vscode": {
14+
"extensions": [
15+
"EditorConfig.EditorConfig",
16+
"GitHub.copilot",
17+
"GitHub.copilot-chat",
18+
"GitHub.vscode-github-actions",
19+
"GitHub.vscode-pull-request-github",
20+
"ms-dotnettools.csharp",
21+
"esbenp.prettier-vscode",
22+
"redhat.vscode-yaml",
23+
"cucumberopen.cucumber-official",
24+
"ms-dotnettools.csdevkit"
25+
]
26+
}
27+
},
28+
"remoteUser": "vscode",
29+
"hostRequirements": {
30+
"memory": "8gb"
31+
},
32+
"postCreateCommand": "git submodule update --init --recursive"
33+
}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*.user
99
*.userosscache
1010
*.sln.docstates
11-
.devcontainer/
1211

1312
# User-specific files (MonoDevelop/Xamarin Studio)
1413
*.userprefs

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,26 @@ On all platforms, the minimum requirements are:
1818
- JetBrains Rider 2022.2+ or Visual Studio 2022+ or Visual Studio Code
1919
- .NET Framework 4.6.2+
2020

21+
### Development Containers
22+
23+
This repository includes support for [Development Containers](https://containers.dev/) (devcontainers), which provide a consistent, containerized development environment. The devcontainer configuration includes all necessary dependencies and tools pre-configured.
24+
25+
To use the devcontainer:
26+
27+
1. **Prerequisites**: Install [Docker](https://www.docker.com/) and either:
28+
- [Visual Studio Code](https://code.visualstudio.com/) with the [Dev Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
29+
- [GitHub Codespaces](https://github.com/features/codespaces)
30+
31+
2. **Using with VS Code**:
32+
- Open the repository in VS Code
33+
- When prompted, click "Reopen in Container" or use the Command Palette (`Ctrl+Shift+P` / `Cmd+Shift+P`) and select "Dev Containers: Reopen in Container"
34+
35+
3. **Using with GitHub Codespaces**:
36+
- Navigate to the repository on GitHub
37+
- Click the "Code" button and select "Create codespace on [branch-name]"
38+
39+
The devcontainer provides a pre-configured environment with the .NET SDK and all necessary tools for development and testing.
40+
2141
## Pull Request
2242

2343
All contributions to the OpenFeature project are welcome via GitHub pull requests.

0 commit comments

Comments
 (0)