Change application settings inside a container

Hello,
I’m pretty new with Docker. I am taking over a project previously set up by someone else. The containers for this project are managed by Docker Swarm.
I understood that the Docker images are unmutable but it’s possible to modify application parameters within the container.
However, in the way the project is currently done, if our customer wants to modify a setting on his platform (for example change the frequency of a batch execution, enable or disable an option, …), he must regenerate a Docker image from the current state of the container to create a new Docker image, because if he modifies settings only in the container, modifications risk being lost (because they are only on the write-layer).
I’d like to improve this behavior because it is not acceptable for our customer not to be able to just change a setting. I have a feeling that it would be good to use a Docker volume containing the configuration files that can be changed by the customer.
But it means that we have to put these files in a specific directory ? the application may stop working because it expects to find these files inside of itself, in her own file tree (much like files for a webapp in the shared/resources directory in a tomcat server).
What’s the best way to make files editable without having to regenerate an image ?
Thanks
Best regards

It pretty much depends on how your application is designed.

You can map any single folder (and all its files ans subfolders) from the host to any folder inside the container - the same is possible for single files. You can map remote fileshares into container folders. Make sure to observe and understand the behavior of what happens when you mount folders into container folder.

May I suggest this free and highly recommend self-paced docker training: https://container.training/intro-selfpaced.yml.html? If you read slides 450 to 475 you should get a basic understanding of volume. Though, I would recommend to read all slides and activly perform the exercerses. Docker is more fun, if you know what you’re doing :slight_smile: Now imagine your predecesor would have read it and your would inherit an environment managed by such someone…

I realize that I never respond to this thread… Oops.
So I was able to do what I wanted using volume, where the config files can be find. Finally it’s very simple.
Thanks for the responses.