Drush can not connect to mysql when run a Drupal in a Docker/Azure
It looks like the environment variables are defined only for HTTP requests. In other words, they seem to be set in FPM, NGINX, or Apache, but not in your shell.

Try typing echo $MYSQL_DATABASE in your shell. If that outputs nothing, you'll have to export the environment variables first, so Drush can see them.