feat: Added devcontainer

This commit is contained in:
Tobias Schmidl 2025-06-16 21:00:22 +02:00
parent 90f9d9a656
commit 781fa188ef

View file

@ -0,0 +1,54 @@
// SPDX-FileCopyrightText: 2025 Tobias Schmidl
//
// SPDX-License-Identifier: AGPL-3.0-or-later
//
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/cpp
{
"name": "glimpses-devcontainer",
"image": "mcr.microsoft.com/devcontainers/cpp:1",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
"ghcr.io/devcontainers-extra/features/cmake:1": {},
"ghcr.io/devcontainers-extra/features/pre-commit:2": {},
"ghcr.io/devcontainers/features/common-utils:2": {
"username": "vscode",
"uid": "${localEnv:UID}",
"gid": "${localEnv:GID}"
},
"ghcr.io/devcontainers/features/docker-outside-of-docker:1": {},
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/python:1": {}
},
// Configure tool-specific properties.
"customizations": {
// Configure properties specific to VS Code.
"vscode": {
"settings": {},
"extensions": [
"editorconfig.editorconfig",
"elagil.pre-commit-helper",
"llvm-vs-code-extensions.vscode-clangd",
"ms-vscode.cmake-tools",
"ms-vscode.cpptools",
"streetsidesoftware.code-spell-checker",
"vivaxy.vscode-conventional-commits"
]
}
},
"containerEnv": {
"CC": "clang",
"CXX": "clang++",
"CMAKE_BUILD_PARALLEL_LEVEL": "${localEnv:NUMBER_OF_PROCESSORS}",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++",
"CMAKE_EXPORT_COMPILE_COMMANDS": "1",
"CMAKE_PREFIX_PATH": "/usr/local/cmake"
},
"mounts": [
"source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,readonly",
"source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind"
],
"workspaceMount": "source=${localWorkspaceFolder},target=${localWorkspaceFolder},type=bind",
"workspaceFolder": "${localWorkspaceFolder}"
}