This directory contains a DevContainer setup for developing Apache Celix inside a container.
Although Apache Celix can be built using CMake with APT-installed dependencies or Conan with Conan-installed/built dependencies, this DevContainer setup is based on Conan.
Please note, the DevContainer setup is not broadly tested and might not work on all systems. It has been tested on MacOS 26 and Fedora 43, using podman.
The devcontainer uses the following container volumes to ensure dependency build and project building is more efficient, even after recreating a devcontainer:
Use podman volume rm / docker volume rm to remove the volumes if you do no longer use them.
VSCode has built-in support for DevContainers. Launch VSCode using the Celix workspace folder, and you will be prompted to open the workspace in a container.
VSCode ensures that your host .gitconfig file and SSH agent forwarding are available in the container.
CLion 2025.3.1 includes DevContainer support (including Podman), so you can open this repository directly using the IDE's DevContainer workflow. Once the container is built, enable and select the conan-debug (generated) profile.
When running “All CTests” from the CLion UI (2025.3.2), ensure that the correct ctest args are used:
Run...)All CTestsEdit...--preset conan-debug --extra-verbose -j1$ProjectFileDir$When running gtests from the CLion UI (2025.3.2) directly from gtest sources, ensure that the environment is correctly configured:
Modify Run Configuration...Edit environment variables (file icon in the Environment variables textfield)Browse from “Load variables from file”build/Debug/generators/conanrun.shOK, Click Apply, Click OkRun conan install to install required dependencies and tools and generate the needed cmake configuration files
conan install . --build missing --profile ${CONAN_PROFILE} ${CONAN_OPTS} ${CONAN_CONF}
Note: CONAN_PROFILE, CONAN_OPTS and CONAN_CONF are environments variables in the dev container.
CMake configure can be done from the root workspace dir:
cmake --preset conan-debug
Build can be done from the root workspace dir:
cmake --build --preset conan-debug --parallel
Tests can be run using ctest. When building with Conan, run tests from the build directory after configuring/building:
ctest --preset conan-debug --output-on-failure -j1
Note -j1 is needed to prevent ctest from running tests parallel; running tests in parallel is currently not supported in Apache Celix.