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 runsuv sync, which creates.venv/in the workspace fromuv.lock(lit, PyYAML, the course website)
Use it on any OS with Docker, or on GitHub Codespaces.
VS Code / Codespaces¶
- Install Docker and the Dev Containers extension.
- Open the repository and choose Reopen in Container.
- The first build takes several minutes.
postCreateCommandthen runscmake --preset linux && cmake --build --preset linux. - In the container's terminal, run
ctest --preset linux -L infraand./course doctor. - 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.