https://github.com/arbmind/cmake-containers
Docker containers for building CMake projects with Qt and Clang or GCC
https://github.com/arbmind/cmake-containers
clang cmake cpp docker-container gcc
Last synced: about 1 month ago
JSON representation
Docker containers for building CMake projects with Qt and Clang or GCC
- Host: GitHub
- URL: https://github.com/arbmind/cmake-containers
- Owner: arBmind
- Created: 2022-03-27T23:30:40.000Z (about 4 years ago)
- Default Branch: develop
- Last Pushed: 2026-01-24T16:39:00.000Z (2 months ago)
- Last Synced: 2026-01-25T05:54:18.250Z (2 months ago)
- Topics: clang, cmake, cpp, docker-container, gcc
- Language: HCL
- Homepage:
- Size: 30.3 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Docker images for CMake
This project generate a set of Docker images around the CMake build system used for CI runs and development setups.
| Image (latest versions) | Size |
| -- | -- |
| [](https://hub.docker.com/r/arbmind/cmake-clang) | [](https://hub.docker.com/r/arbmind/cmake-clang) |
| [](https://hub.docker.com/r/arbmind/cmake-clang-libstdcpp) | [](https://hub.docker.com/r/arbmind/cmake-clang-libstdcpp) |
| [](https://hub.docker.com/r/arbmind/cmake-clang-libstdcpp-qt) | [](https://hub.docker.com/r/arbmind/cmake-clang-libstdcpp-qt) |
| [](https://hub.docker.com/r/arbmind/cmake-clang-libstdcpp-qtgui-dev) | [](https://hub.docker.com/r/arbmind/cmake-clang-libstdcpp-qtgui-dev) |
| [](https://hub.docker.com/r/arbmind/cmake-gcc) | [](https://hub.docker.com/r/arbmind/cmake-gcc) |
| [](https://hub.docker.com/r/arbmind/cmake-gcc-qt) | [](https://hub.docker.com/r/arbmind/cmake-gcc-qt) |
| [](https://hub.docker.com/r/arbmind/cmake-gcc-qtgui-dev) | [](https://hub.docker.com/r/arbmind/cmake-gcc-qtgui-dev) |
### Versions
The compiler and Qt versions, modules and packages are provided as build-args.
See links to Dockerhub for older versions listed in tags.
See [`.github/workflows/docker_build.yml`](https://github.com/arBmind/cmake-containers/blob/develop/.github/workflows/docker_build.yml) for the current bulid matrix.
## Basic Usage
The default entry point is the bash shell.
For your CI you should write a simple bash script that runs the build, as cmake requires multiple invocations.
```bash
docker run -it \
--mount src="$(pwd)",target=/project,type=bind
-w /project \
arbmind/cmake-clang-libstdcpp:latest \
script/cmake_build.sh
```
This mounts your current directory to `/project` and a build volume in the container. Changes the workdir to `/project`.
In the image bash you can do the canonical cmake stuff.
```bash
mkdir build
cd build
cmake ..
cmake --build
```
If you want to see how this works, take a look at these repositories:
* https://github.com/basicpp17/co-cpp19
## Development Setup
The development setup was tested with [CLion](https://www.jetbrains.com/clion/) bud can be used with any custom setup.
For CLion simply add the docker image as a Docker toolchain.
Note: CLion and other IDEs may not always fully support the latest CMake versions.
## Details
The Dockerfile is multi staged and has different targets for all the variants.
All targets with underscores are meant to be internally only.
Note: clang libc++ Qt combination is missing because the Qt Company does not publish Linux binaries built for libc++