Helo pals. after create an wordpres container environment now want to use wp cli the command wp shell to check some wordpress functions, but have problems about database connections.
Wordpress and mariadb are containers inside a pod created using podman, both have a host volume mounted there.
I had installed wp-cli by dnf the package manager of my fedora workstation 36(Linux System) and was trying running the command wp shell in the root of my wordpress web without any success.
The solution was edit the wp-config.php file using the environment variables data used when you created the database container. Edit the second parameter of the function getenv_docker('CONTAINER_VARIABLE', 'edit_here') to match your environment variables values.
Example in my case.