I have a python code. The code checks the folder A every 15 seconds and if there is a csv file there, process it and generates an html report with the same name. I want to run my code on a docker container. The code is working without docker. However, when i want to run my code on docker container i get a path error.
( my dockerfile )
These are lines about errors :
2
Answers
you are trying to load a local file on your host machine through the script which is running in the docket instance. use the
cp
command in your yaml file to copy that file to the docket file system, and then just reference it from thereA docker container cannot access the host file system. You need to mount your folder into the container.
Then use "/path/inside/container" for the python script.
https://docs.docker.com/storage/bind-mounts/