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.
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:
/src/app
.-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.