The Docker image uses environment variables to handle its configuration. This is done with the docker-entrypoint.sh shell script and is not accurate especially if we want to add additional variables.
Add a docker template which nuxeo.default could be done like that :
The only drawback is that sometimes, features are just enabled by setting a value (case for nuxeo.redis.host that enable Redis). Are we capable of doing some if statements in the nuxeo.defaults or define some special behavior when the env variable is not set so that
doesn't set the configuration at all.
NB: after all, the value will be kept in this case, with an empty value.
Some environment variable may also do some actions like installing hotfixes or Nuxeo packages, creating the transient store folder....
For the hotfix and packages, we could embed something in nuxeoctl directly based on an env variable.
For the setup of transient store, it could create the folder itself but there may be rights issues.
Another thing is that we could also define a folder in which we would put Nuxeo Packages (so already downloaded) that should be installed.
This is not in nuxeo.conf, but it could be achieved with the Docker template and a configuration variable.
But we could probably find something better suited, in order to register the instance on Connect upon start rather than using a pre generated CLID now that we have a nuxeoctl register command.