I have an issue that my python program doesen't find a given folder in ubuntu with in a docker container.
First I build my docker container and then I run it which goes without problems until my programm don't find a file. I'm working on a Raspberry pi with Ubuntu Core 16 and Docker to start my python file.
I have found a similar question here and tried their solution:
with open(os.path.join(os.path.expanduser('~'), 'SearchFiles', 'data.csv'), 'r') as csvfile:
But now I get the error:
No such File or directory: 'root/Searchfiles/data.csv'
But the program is the folder ~/usr/git/MVP-Project/Searchfiles/data.csv
Dockerfile for starting the Image:
FROM python:3.6
ADD app.py /
RUN pip install numpy
RUN pip install requests
RUN pip install fake_useragent
RUN pip install datetime
RUN pip install selenium
RUN pip install requests_html
CMD [ "python", "./app.py" ]
So why is it showing the wrong path and how to add the correct path ?