How to have default config file (that I copy to image during build) that I can override with -v option (or else), during container run?
The details:
Imagine I have following directives in Dockerfile:
COPY nginx.conf /etc/nginx/nginx.conf
VOLUME ["/etc/nginx/nginx.conf"]
I want that nginx used copied nginx.conf if no (single file) volume specified - like a default config, that always in the image. And if I specify volume - container will use provided config file instead of copied to image.
So main idea is to have default config that I can override.
Of course following solution is not working, and gives an error. But may be you know how to achieve similar behavior?