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
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
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
python docker
docker pull python
docker run python
docker run -it --rm --name python-script -v "$PWD":/usr/src/app python:3 python ./usr/src/app/script.py
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us