docker run with python command code example
Example 1: how to run python file from cmd in dockerfile
FROM python:3
ADD my_script.py /
RUN pip install pystrich
CMD [ "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