(Re-)Create file at runtime from Spring Boot running in a docker container

  docker, file, spring

I’m currently building a Spring Boot application that periodically needs to (re-)create a file in the container and then serve this file statically.

Previously, before using docker, I could just use the ClassLoader create the file in the /static folder under the src/main/resources. But moving to docker caused this to break.

Any ideas?

Source: Docker Questions