Skip to content
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

Add devcontainer settings #166

Merged
merged 1 commit into from
Jun 3, 2024
Merged
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
44 changes: 44 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "Dev Container - Hackers Ground",

"image": "mcr.microsoft.com/devcontainers/dotnet:8.0-jammy",

"features": {
"ghcr.io/azure/azure-dev/azd:latest": {},
"ghcr.io/devcontainers/features/common-utils:latest": {
"configureZshAsDefaultShell": true
},
"ghcr.io/devcontainers/features/dotnet:latest": {
"version": "6.0",
"additionalVersions": "7.0"
},
"ghcr.io/devcontainers/features/github-cli:latest": {},
"ghcr.io/devcontainers/features/node:latest": {},
"ghcr.io/devcontainers/features/powershell:latest": {}
},

"overrideFeatureInstallOrder": [
"ghcr.io/devcontainers/features/common-utils"
],

"customizations": {
"vscode": {
"extensions": [
"EditorConfig.EditorConfig",
"GitHub.copilot",
"GitHub.copilot-chat",
"GitHub.vscode-github-actions",
"ms-dotnettools.csdevkit",
"ms-vscode.powershell"
]
}
},

"onCreateCommand": "/usr/bin/zsh ./.devcontainer/on-create.sh > ~/on-create.log",

"remoteUser": "vscode",

"hostRequirements": {
"memory": "8gb"
}
}
13 changes: 13 additions & 0 deletions .devcontainer/on-create.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Install additional apt packages
sudo apt-get update && \
sudo apt upgrade -y && \
sudo apt-get install -y dos2unix libsecret-1-0 xdg-utils && \
sudo apt clean -y && \
sudo rm -rf /var/lib/apt/lists/*

## Configure git
git config --global pull.rebase false
git config --global core.autocrlf input

## Enable local HTTPS for .NET
dotnet dev-certs https --trust