Adding JQ command to PHP CLI image
Description
Magento/Adobe Commerce Cloud ENVs are using "base64 + json encoded" ENV variables for storing credentials & configuration. Like:
- MAGENTO_CLOUD_RELATIONSHIPS
You would need to read this ENV variable in case when it is required to build a cross-env "bash" script which would be tested/used locally as well (like DB operations, etc).
The easiest way to properly read json data in "bash" without injecting PHP would be using "jq", like:
MYSQL_USER="$(echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 -d | jq -r '.database[0].username')"
All the Magento Cloud ENVs (Integration/Staging/PROD) has "jq" installed by default, but it doesn't exists locally, forcing us to install it locally (via apt-get) each time when the script should be executed.
Manual testing scenarios
- Execute next command from within PHP CLI container (eg "deploy" one)
echo $MAGENTO_CLOUD_RELATIONSHIPS | base64 -d | jq -r '.database[0].username'

Release notes
Added "jq" CLI tool to easily read json-encoded ENV variables in PHP CLI containers.
Contribution checklist
- [x] Pull request has a meaningful description of its purpose
- [ ] Pull request introduces user-facing changes and includes meaningful release notes and documentation
- [x] All commits are accompanied by meaningful commit messages