I was missing some php extensions that wp-cli and/or WordPress needed but there is no error output stating as much. I’m guessing it was specifically the missing mysqli extension.
I used a WP-CLI command to test the base container for missing extensions and now I have sudo docker-php-ext-install gd sockets mysqli exif
in my config.yml.
Thanks to @leymannx for linking his own repo that got me onto the right track.