Unable to backup the database or apply migrations I'm running CraftCMS via 3 Docker containers in 1 Docker network:

Container 1 - MySQL
Container 2 - Nginx
Container 3 - PHP:7.4-fpm

When I run php craft update craft from container 3 and choose to backup the db, I get this error:
Backup the database? (yes|no) [yes]:yes
Backing up the database ... error: The shell command &quot;mysqldump --defaults-extra-file=&quot;/tmp/hvncbmcornry.cnf&quot; --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --default-character-set=utf8 --set-charset --triggers --no-tablespaces --single-transaction --no-data --result-file=&quot;/app/storage/backups/my-site--2021-05-26-052145--v3.6.15.sql&quot; craftcms &amp;&amp; mysqldump --defaults-extra-file=&quot;/tmp/hvncbmcornry.cnf&quot; --add-drop-table --comments --create-options --dump-date --no-autocommit --routines --default-character-set=utf8 --set-charset --triggers --no-tablespaces --no-create-info --ignore-table=craftcms.assetindexdata --ignore-table=craftcms.assettransformindex --ignore-table=craftcms.sessions --ignore-table=craftcms.templatecaches --ignore-table=craftcms.templatecachequeries --ignore-table=craftcms.templatecacheelements --ignore-table=craftcms.cache --ignore-table=craftcms.templatecachecriteria craftcms &gt;&gt; &quot;/app/storage/backups/my-site--2021-05-26-052145--v3.6.15.sql&quot;&quot; failed with exit code 127: sh: 1: mysqldump: not found

It looks like the mysqldump command doesn't exist in Container 3 as I don't get a result when running: which mysqldump. Running this which command from container 1 does however return: /usr/bin/mysqldump. But in this container, I don't have access to my project.
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