'How to run two flask applications inside a single docker file?

I need to create a single container for a python project in which there are two dependent flask applications running on different port, but as there can be only one CMD in a dockerfile I can run either one of them only, I have also tried using a bash script but the container just dies immediately without giving any error?

It is required to have a single docker container for both of this flask applications as per the project requirements, kindly help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source