In the above my server is unable to read and write data to any directory on server while directory exists but it shows no such file or directory open and error shows. While it's working ok on my system locally.
Asked
Active
Viewed 29 times
0
-
Welcome to StackOverflow. Please take a moment and complete the tour: https://stackoverflow.com/tour, read [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask) Do not post images of your code/errors: https://meta.stackoverflow.com/a/285557/5781499 – Marc Jul 10 '23 at 10:57
1 Answers
0
When you bind map a directory on the host into a container using -v /home/hali/Downloads/thumbnail:/src/app
, the directory will be accessible inside the container on the path /src/app
.
Your program expects to find it at /home/hali/Downloads/thumbnail
, so it doesn't work.
You can fix it in two ways:
- Change the program to write the thumbnails to
/src/app
. - Change the name the directory is mapped to inside the container. If you map it using
-v /home/hail/Downloads/thumbnail:/home/hail/Downloads/thumbnail
the directory will be known under the same name inside the container as it is outside the container.

Hans Kilian
- 18,948
- 1
- 26
- 35