Skip to content

C++ DevBox is a docker devcontainer for C++ development. Based on Debian with LLVM, GCC, VulkanSDK, CMake, VCPKG, zsh.

License

Notifications You must be signed in to change notification settings

gmh5225/cpp-devbox

 
 

C++ DevBox GitHub Workflow Status

A Docker development box for C/C++.

Debian Linux 12-bookworm with LLVM 17 & GCC 13, VulkanSDK 1.3.261.1, CMake, VCPKG, zsh


What is this?

The container is based on Debian Linux (see Dockerfile).

The repo releases 2 container images: one with GCC+LLVM (~2GB) and one with Vulkan SDK on-top (~4GB).

These images can be used to set up a C++ development environment for Visual Studio Code (devcontainer).

What is pre-installed?

Base: Debian 12 - Bookworm

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

  • zsh + plugins: autosuggestions, completions, history substring search
  • git, nano, jq
  • curl, wget
  • cppcheck, valgrind, ccache
  • CMake
  • vcpkg

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

  • LLVM 17.0.2
  • GCC 12.2.0
  • GCC 13.2.0

The with-vulkansdk image additionally contains:

  • Vulkan SDK 1.3.261.1

Prerequisites

You need the following things to run this:

  • Docker
  • Visual Studio Code

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
  1. Get the source: clone this repository using git or download the zip

  2. In VSCode open the folder in a container (Remote Containers: Open Folder in Container):

    This will build the container image (Starting Dev Container (show log): Building image..)

    Which takes a while...

    Then, finally...

  3. Enjoy! 😎

Fetching the prebuild container images

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:latest

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

docker pull ghcr.io/jakoch/cpp-devbox: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:latest

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: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:with-vulkansdk-latest"
}

About

C++ DevBox is a docker devcontainer for C++ development. Based on Debian with LLVM, GCC, VulkanSDK, CMake, VCPKG, zsh.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 91.9%
  • Shell 8.1%