run python application in docker container code example
Example 1: docker run command on container
sudo docker exec -it <container name> <command>
Example 2: dockerfile to run python script
docker run -it --rm --name my-first-python-script -v "$PWD":/usr/src/widget_app python:3 python my_script.py