Presumably this starts a Flask server that keeps running. But: does it? I doubt it, as all containers show Exited.
If Flask is running on port 8080, then your -p 8080:80 is wrong. That publishes the container’s port 80 to the local port 8080; you may have wanted -p 8080:80 instead.
All said, I don’t know why you’re not seeing the ports in docker ps. (I don’t think Docker checks if anything is actually listening to the published ports, and it should even show the ports for stopped containers, I think.)
Docker won’t show the published ports for stopped containers, so you need to make sure that your sample-app.py stays running.