All commands should be run within the container.
to get into your fpm container you can run docker-compose exec -it php-fpm bash
(or ash
depending if you use a debian base image or alpine)
-> within this shell you can execute the bin/console doctrine:migrate command