Skip to content

Add VS Code Dev Container (.devcontainer) support #2

@ramsafin

Description

@ramsafin

I'd like to provide a fully-containerized development environment using Docker + VS Code’s Remote-Containers feature. That will let new contributors get up and running with zero local setup (no need to install CMake, Ninja, compilers, sanitizers, etc.) - just “Open Folder in Container” in VS Code.

  1. Create a .devcontainer/ directory at the project root.
  2. Add a Dockerfile that
    • Starts from a base image (e.g. ubuntu:24.04)
    • Installs all build dependencies: CMake, Ninja, gcc/g++/clang/ccache, git, curl, etc.
    • Sets up a non-root user (vscode or similar)
  3. Add devcontainer.json with:
    • "build": { "dockerfile": "Dockerfile" }
    • Workspace mount (default)
    • Recommended extensions (see .vscode/extensions.json)
    • Forward any ports (if your CLI ever serves a HTTP preview)
    • "remoteUser": "vscode"
    • postCreateCommand: e.g. cmake --preset gcc-RelWithDebInfo
  4. Update README.md with a “Getting Started in Docker” section describing:
    • How to install Docker + VS Code + Remote Containers
    • “Open Folder in Container”
    • How to configure presets inside the container
    • How to run build/tests from inside VS Code or via CLI

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions