I have a config.ini file that gets copied into the container on build. At the moment, there are only a couple of variables that are set static. COT_URL is an IP address and port. For example:
Do you really need to modify config.ini? That file is a mechanism to pass in runtime specific values to your application. However, the balena environment variables already provide the same facility, so just use them directly in your application. For example in Python, if you have a ‘PORT’ env variable you might write:
import os
print(f"My port is {os.getenv('PORT', 80)}")
If you really want to modify config.ini, you could read in the file from within your application, substitute the values from the environment variables like above, and the write the file out again.