Most docker images use config files mounted from the host which doesn’t work with the balena workflow and using a compose file.
I am trying to come up with a way to create files from an env variable so that these can be used when starting a docker image. This will allow to use upstream images and not keep any config in the docker image itself making those more universal and provide new configs at runtime.
config_env = “some config text” - env var set in the balena GUI
start a docker container like
docker run prometheus/prometheus --config.file=$(echo $config_env > /env_files/config_env && echo /env_files/config_env
I am not sure if this would work , but will test it shortly.
Do you think it would be possible to have this as part of balena os/cli? when you have an env var as
config_env you can directly use it as a file