A Docker image for BDD testing with Behave, based on Debian trixie-slim. Designed for use as a devcontainer service or CI runner alongside C/C++ projects.
- Debian trixie-slim (glibc 2.41 — matches the cpputest image)
- Python 3.12
- Behave
- Git
- OpenSSH client
Pull the image from the GitHub Container Registry:
docker pull ghcr.io/davidcozens/behave:latest
Run Behave scenarios by mounting your project directory:
docker run -v <path>:/workspaces ghcr.io/davidcozens/behave behave features/
Where <path> is the fully qualified path to your project folder.
For production use and traceability, prefer a specific SHA tag over latest. Each build is tagged with the commit SHA it was built from (e.g. sha-abc1234). Available tags can be found on the package page:
docker run -v <path>:/workspaces ghcr.io/davidcozens/behave:sha-<commit-sha> behave features/
The base image matches the Debian version used by the cpputest image. This ensures that C binaries built in the cpputest container can run in the behave container without glibc version mismatches.
The image is built and pushed to the GitHub Container Registry automatically on each push to the main branch.
To build locally:
docker build -t behave .