tree: a482dc8694766b452bdd1d0d876d9f346ce99330
  1. Containerfile
  2. devcontainer.json
  3. README.md
.devcontainer/README.md

Apache Celix Development Container

Introduction

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.

Mounts

The devcontainer uses the following container volumes to ensure dependency build and project building is more efficient, even after recreating a devcontainer:

  • celixdev-conan-package-cache
  • celixdev-conan-download-cache
  • celixdev-ccache-cache

Use podman volume rm / docker volume rm to remove the volumes if you do no longer use them.

VSCode Usage

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 Usage

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:

  • ALT-SHIFT-F10 (Run...)
  • Hover All CTests
  • Click Edit...
  • Configure CTest arguments to: --preset conan-debug --extra-verbose -j1
  • Configure working directory to: $ProjectFileDir$

When running gtests from the CLion UI (2025.3.2) directly from gtest sources, ensure that the environment is correctly configured:

  • Click “play” button next to the line numbers
  • Click Modify Run Configuration...
  • Click Edit environment variables (file icon in the Environment variables textfield)
  • Click Browse from “Load variables from file”
  • Browse to build/Debug/generators/conanrun.sh
  • Click OK, Click Apply, Click Ok

Conan Install

Run 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

CMake configure can be done from the root workspace dir:

cmake --preset conan-debug

Building

Build can be done from the root workspace dir:

cmake --build --preset conan-debug --parallel

Running tests

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.