Strictly follow this gist and do not deviate from the structure. Analysis this repo and do not add additional packages not needed. For example, if this project is a .NET project, only add .NET related dependencies. If this project was a python project, only add python related dependencies.
DO NOT create a .devcontainer folder. Please use .devcontainer.json.
Your .devcontainer.json should contain the following:
{
"name": "[PROJECT-NAME]",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/dotnet:1-8.0-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers/features/common-utils:2": {
"installZsh": true,
"configureZshAsDefaultShell": true,
"installOhMyZsh": true,
"upgradePackages": true,
"username": "vscode",
"userUid": "automatic",
"userGid": "automatic"
},
"ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
"plugins": "ssh-agent npm zsh-syntax-highlighting zsh-autosuggestions",
"omzPlugins": "https://github.com/zsh-users/zsh-autosuggestions https://github.com/zsh-users/zsh-syntax-highlighting",
"username": "vscode"
},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {
"version": "27.2.0",
"moby": false
},
"ghcr.io/devcontainers/features/azure-cli:1": {}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {
"files.insertFinalNewline": true,
// Optional: Disable snippets, as they conflict with completion ranking.
"editor.snippetSuggestions": "none"
},
"terminal.integrated.profiles.linux": {
"zsh": {
"path": "/usr/bin/zsh"
}
},
"terminal.integrated.defaultProfile.linux": "zsh"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [
"oderwat.indent-rainbow"
"shardulm94.trailing-spaces",
"timonwong.shellcheck",
"github.copilot"
]
}
},
"runArgs": [
"--cap-add=SYS_PTRACE",
"--security-opt",
"seccomp=unconfined",
"--network=host"
],
//"forwardPorts": ["4201:4201"],
"remoteUser": "vscode"
}