From 781fa188efea71e4b2e736a4030f73db165fdc96 Mon Sep 17 00:00:00 2001 From: Tobias Schmidl Date: Mon, 16 Jun 2025 21:00:22 +0200 Subject: [PATCH] feat: Added devcontainer --- .devcontainer/devcontainer.json | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..88864c7 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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}" +}