From fb1bfe50701a083d95d0d3e1062c01ae80dcd915 Mon Sep 17 00:00:00 2001 From: Bart Beumer Date: Fri, 4 Apr 2025 20:26:04 +0000 Subject: [PATCH] Introduce Dev Container. This was introduced because some conan package could not handle the very new version of CMake that was installed on my local machine even if I selected the latest version. --- .devcontainer/Dockerfile | 21 +++++++++++++++++++++ .devcontainer/devcontainer.json | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 53 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..3e6e1c4 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine:3.21.3 + +# Install tools required for building. +RUN apk update && \ + apk add --no-cache \ + autoconf \ + bash \ + boost-build \ + build-base \ + cmake \ + git \ + libstdc++ \ + libtool \ + linux-headers \ + ninja \ + m4 \ + perl \ + python3 \ + py3-pip && \ + pip install --break-system-packages conan && \ + conan profile detect diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..a8e6b1f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,32 @@ +{ + "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": [ + "ms-vscode.cpptools", + "twxs.cmake", + "ms-vscode.cmake-tools", + "konicy.conan-extension" + ] + } + } + + // 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