Java Spring Boot File / Dir Not Found Exception in docker-compose

Published

i have an API with java spring boot which one of its features is to upload files to a directory i named "upload". when I run the API with mvn spring-boot:run, the project runs and there is no error.
Next I dockerize with docker-compose build and success. Then when I run docker-compose up there is an error: java.io.FileNotFoundException: upload does not exist.

Project Structure

Dockerfile

To Directori

docker-compose.yml

docker-compose.yml

I’m confused why this error occurs, even though when I run it directly it doesn’t matter but when I run it in docker there is an error java.io.FileNotFoundException: upload does not exist.
can anyone help me with this problem?

Source: Dockerfile Questions

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq