It looks like you’re trying to connect to a database in the Strapi image (127.0.0.1 is local to the docker container, not the PC). I don’t think the strapi/strapi image contains a MySQL instance.
Consider using docker-compose and using “db” as a service. Or connect separate db and strapi containers to the same Docker network.