Alright, maybe no one cares, but I fixed it.
You call M-x add-dir-local-variable
Choose the mode: python-mode
choose the variable: pytest-global-name
and the value: docker-compose run --rm <<your_container>> pytest
Now the function pytest-test-one will call the new command. It didn't work for me yet because the folder structure is different in ...