It is common for a docker container to have a configuration file. Instructions for such containers say mount the file into the container as a volume. This works locally but will not work on rancher unless the file is first created on the host.
It would be really cool, if one of the advanced settings of a container was configuration file. You could specify the configuration file location (for the container) and the contents, then rancher would create a file and mount it into the container.
I know there are a couple work arounds, but they all require creating a second container.
- Use a “file only” container and use “volumes_from”
- Create a second container which wraps the first but adds the config file.