About downloading files in docker

  docker, question

Recently, when downloading a written file, the file to be downloaded is stored locally on this computer./var/tmp/dpts/test.pdfBelow the path, then the back end gives the path and file name to the front end, which can download the file.

However, after the project is run in the docker container, the file cannot be successfully downloaded in the docker. I found that in the docker container,/var/tmp/dpts/There is this file in this directory./var/tmp/dpts/test.pdfYes, but the front end just can’t download the file. I checked docker logs and reported an error saying that the file could not be found. As follows

... [error] 9#9: *59 open() "/var/tmp/dpts/test.pdf" failed (2: No such file or directory)

Ask the great god to tell the reason why? Thank you very much!

Is the /var/tmp/dpts/ path in the container -v mapped to the server path?
My code is mapped to docker by -v, which is convenient for modification and submission. There is no need to build image every time. Of course, the data is also mapped from the outside. The download is normal and I have not encountered your situation.