jakoch / cpp-devbox

C++ DevBox is a docker devcontainer for C++ development. Based on Debian with LLVM, GCC, VulkanSDK, Mesa, CMake, VCPKG, mold, zsh.
MIT License
8 stars 9 forks source link
bookworm clang-17 clang-18 cpp debian-12 debian-13 docker gcc-12 gcc-13 gcc-14 llvm mesa mold trixie vulkan-sdk

C++ DevBox GitHub Workflow Status

A Docker development box for C/C++.

Debian Linux 12 Bookworm with LLVM 17 & GCC 13, VulkanSDK 1.3.283.0, Mesa, CMake, VCPKG, mold, zsh

Debian Linux 13 Trixie with LLVM 18 & GCC 14, VulkanSDK 1.3.283.0, Mesa, CMake, VCPKG, mold, zsh

What is this?

This repository maintains Dockerfiles for generating two container images based on two Debian Linux versions.

One image includes GCC and LLVM (container size: ~4GB).

The other image includes GCC, LLVM, and Vulkan SDK with Mesa (container size: ~6GB).

Both images are build using Debian 12 Bookworm and Debian 13 Trixie.

All images are published to the Github Container Registry (GHCR).

The purpose of these images is to setup a C++ development environment within Visual Studio Code using a devcontainer config.

What is pre-installed?

Here is a basic overview of the pre-installed tools. For details, please refer to the Dockerfiles.

On top of the base image the following tools are installed:

Dockerfile for Debian 12 - Bookworm (stable)

The following C/C++ compilers and their toolchains are available:

Dockerfile for Debian 13 - Trixie (unstable)

The following C/C++ compilers and their toolchains are available:

VulkanSDK

The with-vulkansdk image additionally contains:

What is the latest version of VulkanSDK?

Prerequisites

You need the following things to run this:

How to run this?

There are two ways of setting the container up.

Either by building the container image locally or by fetching the prebuild container image from the Github container registry.

Building the Container Image locally using VSCode

Fetching the prebuild container images using Docker

This container image is published to the Github Container Registry (GHCR).

You may find the package here: https://github.com/jakoch/cpp-devbox/pkgs/container/cpp-devbox.

Command Line

You can install the container image from the command line:

docker pull ghcr.io/jakoch/cpp-devbox:bookworm-latest

For the image containing Vulkan SDK append with-vulkansdk-latest:

docker pull ghcr.io/jakoch/cpp-devbox:bookworm-with-vulkansdk-latest

Dockerfile

You might also use this container image as a base image in your own Dockerfile:

FROM ghcr.io/jakoch/cpp-devbox:bookworm-latest

Fetching the prebuild container images using a .devcontainer config

Devcontainer.json

You might use this container image in the .devcontainer/devcontainer.json file of your project:

{
  "name": "My C++ Project DevBox",
  "image": "ghcr.io/jakoch/cpp-devbox:bookworm-latest"
}

Devcontainer.json + with-vulkansdk image

You might use this container image in the .devcontainer/devcontainer.json file of your project:

{
  "name": "My C++ Project DevBox",
  "image": "ghcr.io/jakoch/cpp-devbox:bookworm-with-vulkansdk-latest"
}

Developer Notes

Fetching the bleeding-edge prebuild container images

The bleeding-edge container versions are build using Debian 13 - Trixie.

The Trixie base image ships GCC 13.2 and LLVM 16 by default. For GCC its also the latest available upstream version. For LLVM we installed the latest available upstream version: LLVM 18.

These images are unstable because:

Versioning Scheme for Images

The container images use the following versioning scheme.

Scheduled Builds

The following container tags are created for scheduled builds:

For git push

The following container tags are created only on push, not when tagging:

For git tag

The following container tags are created for git tags:

Latest

The container tag "latest" is applied to the latest build: