Best option: build two images. Especially if they’re running different applications; but even if not, you can write a minimal Dockerfile that’s just
Second option: just provide the command to run on the docker run command line (or explicitly in your docker-compose.yml, Kubernetes pod spec, Nomad job spec, …).
docker run ... my-image the_flask_app
Related recommendation: don’t put an ENTRYPOINT in your Dockerfile unless you mean it. Use CMD instead. (ENTRYPOINT makes that last command and the useful docker run --rm -it my-image sh harder to type. You want it for a script that does startup-time setup that ends in exec "$@" and so also runs the CMD; and for extremely minimal containers that only have statically-linked binaries and no shell, where running any other command is actually impossible.)