I want to experiment with some things, and I would like to be able to locally modify the current release that is installed on the device. i.e. I would like to change settings that are initially set in the docker-compose.
Let’s say for example that I would like to add an additional capability to a container, but have that persist on that device (as opposed to just stopping that container and running it manually)
Is there a file/configuration on the device where one could temporarily make that change ?
I was unable to find a docker compose file or similar.
It sounds like you want to develop on your Balena target to test small changes without going through the whole balena release cycle?
Can I recommend you check out this example/template I’ve posted on GitHub?
This example walks you through setting up a remote SSH server within your container, so that you can use vscode to make changes on target, on your development machine?
Thanks for your reply
As I understand, this is only to make small code/payload changes right ?
What I am looking for is a way to modify the actual release container structure and privileges, not the contents of the applications. Let’s say for example to change the network configuration or the privileged flag
We generally do not support the ability to modify the container structure & privileges at runtime.
We do provide the ability to run the device in “Local Mode”, which allows an interface from your dev machine to the device’s container engine, running on your local network, to modify container settings… but this is usually reserved for development purposes only & is considered insecure.
Might I suggest you explore running 2 services, with different container settings, and then Enable/Disable them using env-vars in the BalenaCloud Dashboard or via the Supervisor API? This grants you a much more secure way of “managing container settings”.
My purpose is just internal testing and debugging so it does not have to be a supported capability, a simple way to hack my way through that would more than suffice
Local mode works but I was hoping for something easier and faster within the device itself, to be able to fiddle and test multiple configurations. Maybe by intercepting the container start-up process of the balena engine ? Or modifying the release configuration within the device ? Would something of the two be possible ?
I haven’t been able to find an API endpoint that accepts container execution settings or parameters unfortunately.. Where does the supervisor get the configuration from ? (e.g. the release docker compose) Thanks
Looking at the Docker Engine API documentation, there is only a small subset of configurations that can be updated at runtime on the container. We generally don’t support anything beyond the standard docker runtime.