I think at this point it doesn’t matter what you use. It looks like you have a carriage return character in your phinx phar file. The line endings on Windows is \r\n but it is \n on Linux. If you have built your PHP Composer dependencies on Windows and copied it into the Linux container it won’t work. Docker Desktop tries to hide magic behind the graphical interface, but you still have two different platforms. Make sure you run composer install on Linux, for example in a container during build or after the build using docker-compose exec
Sometimes, when you clone a git repository on Windows, your git client based on your settings will change the line endings. You can turn that off or use git in a container too. For example in a multi-stage build:
update2:
You can also enable WSL integration in Docker Desktop and use the Docker client and the git client from WSL so your line endings will be compatible with Linux.