I manage to fix the issue after numerous of research, for those who are interested, here is the solution,
Check output of docker ps command and look for running mysql
containers. If you find one then use mysql command like this: mysql -h
127.0.0.1 -P <mysql_port> (you will find port in docker ps output). If you can't find any running mysql container ...
Sounds like your php-fpm container 3 needs to install the MySQL client tools in it, so that mysqldump is available in the container similar to https://github.com/craftcms/docker/blob/main/7.4/dev.Dockerfile#L18