Today I learned more about Docker and Python.
The blog post Connection refused? Docker networking and how it impacts your image gives an approachable overview over networking with Docker.
In the end you have to add the host with port 0.0.0.0
to your docker config:
CMD ["flask", "run", "--host", "0.0.0.0"]
Read more about Docker and Python on Itamar Turner-Tauring’s blog Python Speed.