I am starting out with docker and trying to run a python code that generates a csv file as output.
import pandas as pd
# string values in the list
lst = ['Java', 'Python', 'C', 'C++',
'JavaScript', 'Swift', 'Go']
# Calling DataFrame constructor on list
dframe = pd.DataFrame(lst)
dframe.to_csv('test.csv')
This is my docker configuration:
FROM python:3.8
ADD main.py .
VOLUME /out
RUN pip install pandas
CMD ["python", "./main.py"]
This is how I call docker.
docker run --volume=/Users/myuser/Documents/DashyDash/Docker/out:/out python-test
However I am unable to find the output file. Can someone tell me what I am doing wrong and help me fix it.
Thank you!