Skip to content

Dev container (Docker)

.devcontainer/ defines an Ubuntu 24.04 image that contains:

  • LLVM 23 from apt.llvm.org (clang-23, clangd, FileCheck, …)
  • GoogleTest, Ninja and CMake
  • uv; the container's first start runs uv sync, which creates .venv/ in the workspace from uv.lock (lit, PyYAML, the course website)

Use it on any OS with Docker, or on GitHub Codespaces.

VS Code / Codespaces

  1. Install Docker and the Dev Containers extension.
  2. Open the repository and choose Reopen in Container.
  3. The first build takes several minutes. postCreateCommand then runs cmake --preset linux && cmake --build --preset linux.
  4. In the container's terminal, run ctest --preset linux -L infra and ./course doctor.
  5. Read the course in your browser: ./course serve --host 0.0.0.0, then open the forwarded port 8000.

clangd is preconfigured to use build/linux/compile_commands.json.

Plain Docker

docker build -f .devcontainer/Dockerfile -t pebble-dev .
docker run --rm -it -p 8000:8000 -v "$PWD":/work -w /work pebble-dev bash
uv sync && cmake --preset linux && cmake --build --preset linux && ctest --preset linux
./course serve --host 0.0.0.0     # the course website on http://localhost:8000

On Apple Silicon the image is built for arm64, and apt.llvm.org provides arm64 packages. Building inside the container gives you a Linux build. Plugins built there cannot be loaded into a macOS opt, and macOS plugins cannot be loaded there.

Updating LLVM

The image pins the major version with the build argument LLVM_MAJOR (default 23). Keep it in sync with PEBBLE_PIN_LLVM_MAJOR; see dependencies.md.