From c09843513e4a6c133a1d69f80328f36798468ae2 Mon Sep 17 00:00:00 2001 From: Matthias Gehre Date: Tue, 12 Mar 2024 22:24:30 +0000 Subject: [PATCH] Add devcontainer --- .devcontainer/Dockerfile | 14 ++++++++++++++ .devcontainer/devcontainer.json | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..8fa2182 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,14 @@ +FROM mcr.microsoft.com/devcontainers/cpp:1-ubuntu-22.04 + +ARG REINSTALL_CMAKE_VERSION_FROM_SOURCE="none" + +# [Optional] Uncomment this section to install additional vcpkg ports. +# RUN su vscode -c "${VCPKG_ROOT}/vcpkg install " + +# [Optional] Uncomment this section to install additional packages. +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends \ + build-essential cmake lsb-release wget software-properties-common gnupg + +RUN sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" +RUN sudo apt-get -y install llvm-18-dev libclang-18-dev \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..3b4edca --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,33 @@ +// 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": "C++", + "build": { + "dockerfile": "Dockerfile" + }, + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + "settings": {}, + "extensions": [ + "streetsidesoftware.code-spell-checker", + "llvm-vs-code-extensions.vscode-clangd", + "GitHub.vscode-github-actions" + ] + } + } + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Use 'postCreateCommand' to run commands after the container is created. + // "postCreateCommand": "gcc -v", + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} \ No newline at end of file