docker: Fix cmake version to 3.31.6
Previously the newest available version of cmake was always installed in the shrinkwrap docker image. But since v4.0.0 was released, we started getting an error when compiling the optee client as part of buildroot (our default buildroot config enables optee):
---8<--- CMake Error at CMakeLists.txt:1 (cmake_minimum_required): Compatibility with CMake < 3.5 has been removed from CMake.
Update the VERSION argument value. Or, use the ... syntax to tell CMake that the project requires at least but has been updated to work with policies introduced by or earlier.
Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway. ---8<---
The issue is that optee doesn't explicitly specify a policy version so cmake assumes a very old one which is no longer supported in v4.0.0. Ultimately this needs to be fixed in buildroot's upstream, but until then, let's fix the version at the newest v3 point release.
Signed-off-by: Ryan Roberts ryan.roberts@arm.com