Hi,
I am trying to store a csv file inside a docker container and use binds to store it locally. The problem I'm facing is if i use just the file name to write to csv it is getting saved in /app directory. If I use any other path say /mydata/output.csv it's not getting stored.
If I use mount to store the file in local directory the container is failing with message "Error ./main.py is not a file or directory".
local_file_name="output.csv"
local_path = "/mydata/output"
os.mkdir(local_path)
upload_file_path = os.path.join(local_path, local_file_name)
with open(upload_file_path, 'a') as csvfile:
print("opened csv file")
csvwriter = csv.writer(csvfile)
csvwriter.writerow(metalist)
Deployment manifest
"HostConfig": {
"Binds": [
"/opt/localstorage/output:/app"
]
}