docker run directly into python script code example
Example 1: 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
Example 2: Docker Python Script Run
# Dockerfile
FROM python:3
ADD my_script.py /
CMD [ "python", "./my_script.py" ]
# Commandline
docker run IMAGE /path/to/script.py