Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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" ]
Comment

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
Comment

PREVIOUS NEXT
Code Example
Python :: how to delete a specific line in a file 
Python :: python files 
Python :: pip install django rest framework 
Python :: django redirect to external url 
Python :: python3 yyyymmddhhmmss 
Python :: pandas apply pass in arguments 
Python :: pyodbc sql save pandas dataframe 
Python :: pandas remove column 
Python :: kaggle vs colab 
Python :: multiple line input python 
Python :: lecture de fichier python 
Python :: python convert list to absolute value 
Python :: case statement in pandas 
Python :: add a string to each element of a list python 
Python :: python randomize a dataframe pandas 
Python :: first 5 letters of a string python 
Python :: python optionmenu tkinter 
Python :: how to add three conditions in np.where in pandas dataframe 
Python :: pytorch l2 regularization 
Python :: subprocess print logs 
Python :: numpy flatten 
Python :: try except python 
Python :: python program to count even and odd numbers in a list 
Python :: pandas dataframe total row 
Python :: dataframe get index name 
Python :: reverse geocoding python 
Python :: how to make a class in python 
Python :: python sizeof 
Python :: print only numbers from string python 
Python :: loop append to list python 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =