This image packages a ready-to-run Project CHIP checkout and virtual environment so tests can run without rebuilding the toolchain on every invocation.
docker build -t matter-tests:latest --build-arg CHIP_VERSION=v1.4.2.0 .Adjust CHIP_VERSION if you need a different release tag or branch.
To target multiple CPU architectures locally, use Buildx:
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 \
-t matter-tests:latest --build-arg CHIP_VERSION=v1.4.2.0 .If the CI workflow has already published an image, pull it directly from Docker Hub:
docker pull flipperdevices/matter-tests:latestYou can run the image via the fully qualified name or retag it locally for brevity:
docker tag flipperdevices/matter-tests:latest matter-tests:latestPut all persistent data under a data directory in the current working directory, like PAA trust stores (./data/paa-store/).
docker run --rm -it \
--network=host \
--volume "$PWD/data:/data" \
--volume "$PWD/logs:/tmp/matter_testing/logs" \
flipperdevices/matter-tests:latestInside the container:
source /python_env/bin/activate
python3 src/python_testing/TC_SC_4_3.py \
--commissioning-method on-network \
--discriminator 1300 \
--passcode 2594278 \
--paa-trust-store-path /data/paa-store \
--storage-path /data/admin_storage.jsonThe container entrypoint automatically activates /python_env, so python3 and pip already point at the bundled virtual environment.
- Builder dependencies are pruned from the final runtime layer so the image stays small but still contains the CHIP source tree and compiled Python dependencies. Only the shared libraries and lightweight diagnostics needed for running tests remain; install extra packages in a derived image if you need additional tooling.
- The runtime stage sets
PIP_BREAK_SYSTEM_PACKAGES=1which matches the expectations of CHIP's bootstrap scripts and allows ad-hoc pip installs when debugging tests. - Mount
logs,paa-storeandstorageas volumes (as shown above) so credentials and test artifacts persist outside the container. - CI publishes
linux/amd64andlinux/arm64manifests to Docker Hub (flipperdevices/matter-tests). - QEMU emulation is enabled in CI for the ARM builds so that cross-architecture Docker layers can be produced on GitHub's x86 runners.